DirectoryLink
Namespace: TagBites.IO
Assembly: TagBites.IO.dll
Provides a mechanism for linking to the directory. This class cannot be inherited.
public sealed class DirectoryLink : TagBites.IO.FileSystemStructureLink
Properties
Type
public FileSystemLinkType Type { get; }
Result Type: FileSystemLinkType
Methods
Create()
Creates all directories and subdirectories in the specified path unless they already exist.
public void Create()
Result Type: void
CreateAsync()
Asynchronously creates all directories and subdirectories in the specified path unless they already exist.
public Task CreateAsync()
Result Type: Task
CreateWatcher(bool)
Creates a directory watcher for current link.
public IFileSystemLinkWatcher CreateWatcher(bool recursive)
Result Type: IFileSystemLinkWatcher
Parameters
Type | Name | |
---|---|---|
bool | recursive | to watch directories, subdirectories, and files in path; otherwise, . |
Delete(bool)
Deletes a specified directory, and optionally any subdirectories.
public void Delete(bool recursive)
Result Type: void
Parameters
Type | Name | |
---|---|---|
bool | recursive | to remove directories, subdirectories, and files in path; otherwise, . |
DeleteAsync(bool)
Asynchronously deletes a specified directory, and optionally any subdirectories.
public Task DeleteAsync(bool recursive)
Result Type: Task
Parameters
Type | Name | |
---|---|---|
bool | recursive | to remove directories, subdirectories, and files in path; otherwise, . |
GetDirectories(string, bool)
Retrieves a collection of links to directories that match the specified search options.
public IList<DirectoryLink> GetDirectories(string searchPattern, bool recursive)
Result Type: IList<DirectoryLink>
Parameters
Type | Name | |
---|---|---|
string | searchPattern | The search options to match against the links to directories in current directory. |
bool | recursive | to get links to directories in the current directory and all its subdirectories; otherwise, . |
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)
Result Type: Task<IList<DirectoryLink>>
Parameters
Type | Name | |
---|---|---|
string | searchPattern | The search options to match against the links to directories in current directory. |
bool | recursive | to get links to directories in the current directory and all its subdirectories; otherwise, . |
GetDirectory(string)
Returns a link to the directory with specified relative full name.
public DirectoryLink GetDirectory(string relativeDirectoryName)
Result Type: DirectoryLink
Parameters
Type | Name | |
---|---|---|
string | relativeDirectoryName | The path under the . |
GetExistingLink(string)
Returns a link to the file/directory with specified relative full name.
public FileSystemStructureLink GetExistingLink(string relativeFullName)
Result Type: FileSystemStructureLink
Parameters
Type | Name | |
---|---|---|
string | relativeFullName |
GetFile(string)
Returns a link to the file with specified relative full name.
public FileLink GetFile(string relativeFileName)
Result Type: FileLink
Parameters
Type | Name | |
---|---|---|
string | relativeFileName | The name of file under the . |
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
Type | Name | |
---|---|---|
string | searchPattern | The search options to match against the links to files in current directory. |
bool | recursive | to get links to files in the current directory and all its subdirectories; otherwise, . |
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)
Result Type: Task<IList<FileLink>>
Parameters
Type | Name | |
---|---|---|
string | searchPattern | The search options to match against the links to files in current directory. |
bool | recursive | to get links to files in the current directory and all its subdirectories; otherwise, . |
GetInfo()
Gets the information about the directory.
protected IFileSystemStructureLinkInfo GetInfo()
Result Type: IFileSystemStructureLinkInfo
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)
Result Type: IList<FileSystemStructureLink>
Parameters
Type | Name | |
---|---|---|
string | searchPattern | The search options to match against the links to files and directories in current directory. |
bool | recursive | to get links to files and directories in the current directory and all its subdirectories; otherwise, . |
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)
Result Type: Task<IList<FileSystemStructureLink>>
Parameters
Type | Name | |
---|---|---|
string | searchPattern | The search options to match against the links to files and directories in current directory. |
bool | recursive | to get links to files and directories in the current directory and all its subdirectories; otherwise, . |