public KfsFsWatcher(KfsShare share) { Share = share; Instance = new FileSystemWatcher(Share.ShareFullPath); // Invoke event handlers in the UI thread Control c = (Control)Misc.MainForm; Instance.SynchronizingObject = c; // We must be notified of directory and file creation / renaming / file size change / file lastWrite change. Instance.NotifyFilter = NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.LastWrite; // Watch recursively Instance.IncludeSubdirectories = true; Instance.Changed += HandleOnWatcherChanged; Instance.Created += HandleOnWatcherChanged; Instance.Deleted += HandleOnWatcherChanged; Instance.Renamed += HandleOnWatcherChanged; Instance.Error += HandleOnWatcherError; Instance.EnableRaisingEvents = true; }
public KfsUploadThread(KfsShare share, byte[] ticket, ulong emailID, SortedDictionary<UInt64, KfsUploadBatchFile> orderTree, KfsPhase1Payload phase1Payload) : base(share, ticket, emailID) { Debug.Assert(orderTree.Count > 0); OrderTree = orderTree; Phase1Payload = phase1Payload; FileArray = new KfsUploadBatchFile[OrderTree.Count]; OrderTree.Values.CopyTo(FileArray, 0); }
public KfsPartialScanThread(KfsShare _share, List<string> _toScan) { m_share = _share; foreach (string path in _toScan) { m_results.Add(new KfsScan(m_share, path)); } }
public UiTransferMsg(KfsShare share) { Share = share; }
public KfsMetaDataThread(KfsShare s, byte[] ticket, KfsPhase1Payload payload) : base(s, ticket, 0) { Phase1Payload = payload; }
public KfsStatusView(KfsShare S) { Share = S; Share.StatusView = this; }
public KfsFileTransfer(KfsShare s, UInt64 orderID, String lastFullPath) { Share = s; OrderID = orderID; LastFullPath = lastFullPath; }
public KfsUpdateServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, UInt64 i) : base(s, eid, date, uid, cid) { Inode = i; }
public KfsCreateServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, bool f, UInt64 ci, UInt64 pi, String n) : base(s, eid, date, uid, cid) { IsFile = f; CreatedInode = ci; ParentInode = pi; Name = n; }
public KfsPhase2ServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid) : base(s, eid, date, uid, cid) { }
public KfsServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid) { Share = s; EventID = eid; OpID = Share.ServerOpID++; Date = date; UserID = uid; CommitID = cid; }
public KfsMoveServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, bool f, UInt64 mi, UInt64 di, String n) : base(s, eid, date, uid, cid) { IsFile = f; MovedInode = mi; DestinationDirInode = di; DestName = n; }
public KfsDeleteServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, bool f, UInt64 i) : base(s, eid, date, uid, cid) { IsFile = f; Inode = i; }
public KfsFileUpload(KfsShare s, UInt64 orderID, UInt64 trackedInode, String trackedPath, String lastFullPath, String uploadPath, UInt64 size, UInt64 updateCommitID, ulong emailID) : base(s, orderID, lastFullPath) { TrackedInode = trackedInode; TrackedPath = trackedPath; UploadPath = uploadPath; Size = size; UpdateCommitID = updateCommitID; EmailID = emailID; }
public KfsLocalDirectory(KfsShare S, KfsLocalDirectory P, String N) : base(S, P, N) { }
public override void NormalizeState() { if (m_share == null) m_share = new KfsShare(this); m_share.NormalizeState(); }
/// <summary> /// This constructor creates the path but does NOT insert it in the view. /// </summary> /// <param name="S">Share</param> /// <param name="P">Local object, if any</param> /// <param name="N">Server object, if any</param> public KfsStatusPath(KfsShare s, String path, KfsLocalObject lo, KfsServerObject so) { Share = s; Path = path; Name = KfsPath.BaseName(path); LocalObject = lo; ServerObject = so; }
public override void PrepareForRebuild(KwsRebuildInfo rebuildInfo) { if (rebuildInfo.DeleteLocalDataFlag) DeleteLocalFiles(); // Create a new share object if this is not a soft upgrade. if (!rebuildInfo.UpgradeFlag) m_share = new KfsShare(this); base.PrepareForRebuild(rebuildInfo); NormalizeState(); }
public KfsPipeline(KfsShare S) { Share = S; Share.Pipeline = this; WakeupTimer = new KWakeupTimer(); WakeupTimer.TimerWakeUpCallback = OnTimerEvent; }
public AppKfs(SerializationInfo info, StreamingContext context) : base(info, context) { m_share = info.GetValue("m_Share", typeof(KfsShare)) as KfsShare; }
public KfsTransferThread(KfsShare share, byte[] ticket) : base(share.App.Helper, null, 0) { Share = share; Ticket = ticket; }
public KfsGate(KfsShare s) { Share = s; Share.Gate = this; }
public KfsMetaDataManager(KfsShare s) { Share = s; Share.MetaDataManager = this; }
public KfsTransferThread(KfsShare share, byte[] ticket, ulong emailID) : base(share.App.Helper, null, 0) { Share = share; Ticket = ticket; EmailID = emailID; }
public KfsInitialScanThread(KfsShare _share) { m_share = _share; }
/// <summary> /// This constructor creates the object and inserts it in the view. /// </summary> /// <param name="S">Share</param> /// <param name="P">Parent directory</param> /// <param name="N">Name</param> public KfsLocalObject(KfsShare S, KfsLocalDirectory P, String N) { Share = S; Parent = P; Name = N; AddToView(); }
public KfsScan(KfsShare _share, String _path) { m_share = _share; m_subtreePath = _path; }
public KfsLocalView(KfsShare S) { Share = S; Share.LocalView = this; // Create the root directory. new KfsLocalDirectory(Share, null, ""); }
/// <summary> /// Request the watcher to stop watching. /// </summary> public void StopWatching() { Share = null; Instance.EnableRaisingEvents = false; }
public KfsUploadManager(KfsShare S) { Share = S; Share.UploadManager = this; }