DirectoryLink
Namespace: TagBites.IO
Assembly: TagBites.IO.dll
Product: TagBites.IO v. 2.0.0
Provides a mechanism for linking to the directory. This class cannot be inherited.
public sealed class DirectoryLink : TagBites.IO.FileSystemStructureLinkInheritance: object → FileSystemStructureLink → DirectoryLink
Properties
Section titled “Properties”public virtual FileSystemLinkType Type { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Create()
Section titled “Create()”Creates all directories and subdirectories in the specified path unless they already exist.
public void Create()CreateAsync()
Section titled “CreateAsync()”Asynchronously creates all directories and subdirectories in the specified path unless they already exist.
public Task CreateAsync()Returns
Section titled “Returns”The task object representing the asynchronous operation.
CreateWatcher(bool)
Section titled “CreateWatcher(bool)”Creates a directory watcher for current link.
public IFileSystemLinkWatcher CreateWatcher(bool recursive)Parameters
Section titled “Parameters”recursivebool
trueto watch directories, subdirectories, and files in the path; otherwise,false.
Returns
Section titled “Returns”A IFileSystemLinkWatcher object for listening to a directory change notifications and raises events when a directory changes.
Delete(bool)
Section titled “Delete(bool)”Deletes a specified directory, and optionally any subdirectories.
public void Delete(bool recursive)Parameters
Section titled “Parameters”recursivebool
trueto remove directories, subdirectories, and files in the path; otherwise,false.
DeleteAsync(bool)
Section titled “DeleteAsync(bool)”Asynchronously deletes a specified directory, and optionally any subdirectories.
public Task DeleteAsync(bool recursive)Parameters
Section titled “Parameters”recursivebool
trueto remove directories, subdirectories, and files in the path; otherwise,false.
Returns
Section titled “Returns”The task object representing the asynchronous operation.
GetDirectories(string, bool)
Section titled “GetDirectories(string, bool)”Retrieves a collection of links to directories that match the specified search options.
public IList<DirectoryLink> GetDirectories(string searchPattern, bool recursive)Parameters
Section titled “Parameters”searchPatternstring
The search options to match against the links to directories in current directory.recursivebool
trueto get links to directories in the current directory and all its subdirectories; otherwise,false.
Returns
Section titled “Returns”A collection of links to the directories.
GetDirectoriesAsync(string, bool)
Section titled “GetDirectoriesAsync(string, bool)”Asynchronously retrieves a collection of links to directories that match the specified search options.
public Task<IList<DirectoryLink>> GetDirectoriesAsync(string searchPattern, bool recursive)Parameters
Section titled “Parameters”searchPatternstring
The search options to match against the links to directories in current directory.recursivebool
trueto get links to directories in the current directory and all its subdirectories; otherwise,false.
Returns
Section titled “Returns”The task object representing the asynchronous operation. The value of the parameter contains a collection of links to the directories.
GetDirectory(string)
Section titled “GetDirectory(string)”Returns a link to the directory with specified relative full name.
public DirectoryLink GetDirectory(string relativeDirectoryName)Parameters
Section titled “Parameters”relativeDirectoryNamestring
The path under the FileSystemStructureLink.FullName.
Returns
Section titled “Returns”A DirectoryLink object representing a link to the directory.
GetDirectoryAsync(string)
Section titled “GetDirectoryAsync(string)”Returns a link to the directory with specified relative full name.
public Task<DirectoryLink> GetDirectoryAsync(string relativeDirectoryName)Parameters
Section titled “Parameters”relativeDirectoryNamestring
The path under the FileSystemStructureLink.FullName.
Returns
Section titled “Returns”A Task of DirectoryLink object representing a link to the directory.
GetExistingLink(string)
Section titled “GetExistingLink(string)”Returns a link to the file/directory with specified relative full name.
public FileSystemStructureLink GetExistingLink(string relativeFullName)Parameters
Section titled “Parameters”relativeFullNamestring
Returns
Section titled “Returns”A FileSystemStructureLink object representing a link to the file/directory.
GetExistingLinkAsync(string)
Section titled “GetExistingLinkAsync(string)”Returns a link to the file/directory with specified relative full name.
public Task<FileSystemStructureLink> GetExistingLinkAsync(string relativeFullName)Parameters
Section titled “Parameters”relativeFullNamestring
Returns
Section titled “Returns”A Task of FileSystemStructureLink object representing a link to the file/directory.
GetFile(string)
Section titled “GetFile(string)”Returns a link to the file with specified relative full name.
public FileLink GetFile(string relativeFileName)Parameters
Section titled “Parameters”relativeFileNamestring
The name of file under the FileSystemStructureLink.FullName.
Returns
Section titled “Returns”A FileLink object representing a link to a file.
GetFileAsync(string)
Section titled “GetFileAsync(string)”Returns a link to the file with specified relative full name.
public Task<FileLink> GetFileAsync(string relativeFileName)Parameters
Section titled “Parameters”relativeFileNamestring
The name of file under the FileSystemStructureLink.FullName.
Returns
Section titled “Returns”A Task of FileLink object representing a link to a file.
GetFiles(string, bool)
Section titled “GetFiles(string, bool)”Retrieves a collection of links to files that match the specified search options.
public IList<FileLink> GetFiles(string searchPattern, bool recursive)Parameters
Section titled “Parameters”searchPatternstring
The search options to match against the links to files in current directory.recursivebool
trueto get links to files in the current directory and all its subdirectories; otherwise,false.
Returns
Section titled “Returns”A collection of links to the files.
GetFilesAsync(string, bool)
Section titled “GetFilesAsync(string, bool)”Asynchronously retrieves a collection of links to files that match the specified search options.
public Task<IList<FileLink>> GetFilesAsync(string searchPattern, bool recursive)Parameters
Section titled “Parameters”searchPatternstring
The search options to match against the links to files in current directory.recursivebool
trueto get links to files in the current directory and all its subdirectories; otherwise,false.
Returns
Section titled “Returns”The task object representing the asynchronous operation. The value of the parameter contains a collection of links to the files.
GetLinks(string, bool)
Section titled “GetLinks(string, bool)”Retrieves a collection of links to files and directories that match the specified search options.
public IList<FileSystemStructureLink> GetLinks(string searchPattern, bool recursive)Parameters
Section titled “Parameters”searchPatternstring
The search options to match against the links to files and directories in current directory.recursivebool
trueto get links to files and directories in the current directory and all its subdirectories; otherwise,false.
Returns
Section titled “Returns”IList<FileSystemStructureLink>
GetLinksAsync(string, bool)
Section titled “GetLinksAsync(string, bool)”Asynchronously retrieves a collection of links to files and subdirectories that match the specified search options.
public Task<IList<FileSystemStructureLink>> GetLinksAsync(string searchPattern, bool recursive)Parameters
Section titled “Parameters”searchPatternstring
The search options to match against the links to files and directories in current directory.recursivebool
trueto get links to files and directories in the current directory and all its subdirectories; otherwise,false.
Returns
Section titled “Returns”Task<IList<FileSystemStructureLink>>
The task object representing the asynchronous operation. The value of the parameter contains