FileSystemLinkWatcher
Namespace: TagBites.IO
Assembly: TagBites.IO.dll
Product: TagBites.IO v. 2.0.0
Provides the base class for watchers that listen to file system notifications and raise events when a file or directory changes.
public abstract class FileSystemLinkWatcher : TagBites.IO.IFileSystemLinkWatcher, System.IDisposableInheritance: object → FileSystemLinkWatcher
Constructors
Section titled “Constructors”FileSystemLinkWatcher(IFileSystemLink, bool)
Section titled “FileSystemLinkWatcher(IFileSystemLink, bool)”Initializes a new instance of the FileSystemLinkWatcher class for a specified link system and full name.
protected FileSystemLinkWatcher(IFileSystemLink link, bool recursive)Parameters
Section titled “Parameters”linkIFileSystemLink
The link to a file/directory/file version.recursivebool
trueto watch the current directory, all its subdirectories; otherwise,false.
Properties
Section titled “Properties”FileSystem
Section titled “FileSystem”Gets the file system to which the Link belongs.
protected FileSystem FileSystem { get; }Property Value
Section titled “Property Value”A FileSystem object representing file system to which the handle belongs.
IsDisposed
Section titled “IsDisposed”Gets a value indicating whether this instance has been disposed.
public bool IsDisposed { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”No event is raised once the watcher is disposed, including one already scheduled by a derived class.
Gets the link to a file/directory/file version.
public virtual IFileSystemLink Link { get; }Property Value
Section titled “Property Value”A IFileSystemLink object representing the link to the file/directory/file version.
Recursive
Section titled “Recursive”Gets a value indicating whether to watch the current directory, all its subdirectories.
protected bool Recursive { get; }Property Value
Section titled “Property Value”true to watch the current directory, all its subdirectories; otherwise, false.
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”public virtual void Dispose()Dispose(bool)
Section titled “Dispose(bool)”Releases all resources used by this.
protected virtual void Dispose(bool disposing)Parameters
Section titled “Parameters”disposingbool
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
OnChanged(string)
Section titled “OnChanged(string)”Raises the Changed event.
protected void OnChanged(string fullName)Parameters
Section titled “Parameters”fullNamestring
The full path of the directory or file.
OnChanged(IFileSystemLink)
Section titled “OnChanged(IFileSystemLink)”Raises the Changed event.
protected void OnChanged(IFileSystemLink link)Parameters
Section titled “Parameters”linkIFileSystemLink
The link.
OnCreated(string)
Section titled “OnCreated(string)”Raises the Created event.
protected void OnCreated(string fullName)Parameters
Section titled “Parameters”fullNamestring
The full path of the directory or file.
OnCreated(IFileSystemLink)
Section titled “OnCreated(IFileSystemLink)”Raises the Created event.
protected void OnCreated(IFileSystemLink link)Parameters
Section titled “Parameters”linkIFileSystemLink
The link.
OnDeleted(string)
Section titled “OnDeleted(string)”Raises the Deleted event.
protected void OnDeleted(string fullName)Parameters
Section titled “Parameters”fullNamestring
The full path of the directory or file.
OnDeleted(IFileSystemLink)
Section titled “OnDeleted(IFileSystemLink)”Raises the Deleted event.
protected void OnDeleted(IFileSystemLink link)Parameters
Section titled “Parameters”linkIFileSystemLink
The link.
OnMoved(string, string)
Section titled “OnMoved(string, string)”Raises the Moved event.
protected void OnMoved(string sourceFullName, string destinationFullName)Parameters
Section titled “Parameters”sourceFullNamestring
The full path of the source directory or file.destinationFullNamestring
The full path of the destination directory or file.
OnMoved(IFileSystemLink, IFileSystemLink)
Section titled “OnMoved(IFileSystemLink, IFileSystemLink)”Raises the Moved event.
protected void OnMoved(IFileSystemLink source, IFileSystemLink destination)Parameters
Section titled “Parameters”sourceIFileSystemLink
A source link.destinationIFileSystemLink
A destination link.
Events
Section titled “Events”Changed
Section titled “Changed”Occurs when the file system link is changed.
public virtual EventHandler<FileSystemLinkChangeEventArgs> ChangedEvent Type
Section titled “Event Type”EventHandler<FileSystemLinkChangeEventArgs>
Created
Section titled “Created”Occurs when the file system link is created.
public virtual EventHandler<FileSystemLinkChangeEventArgs> CreatedEvent Type
Section titled “Event Type”EventHandler<FileSystemLinkChangeEventArgs>
Deleted
Section titled “Deleted”Occurs when the file system link is deleted.
public virtual EventHandler<FileSystemLinkChangeEventArgs> DeletedEvent Type
Section titled “Event Type”EventHandler<FileSystemLinkChangeEventArgs>
Occurs when the file system link is moved.
public virtual EventHandler<FileSystemLinkMoveEventArgs> Moved