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

public FileSystemLinkType Type { get; }

Result Type: FileSystemLinkType

Methods

Creates all directories and subdirectories in the specified path unless they already exist.

public void Create()

Result Type: void

Asynchronously creates all directories and subdirectories in the specified path unless they already exist.

public Task CreateAsync()

Result Type: Task

Creates a directory watcher for current link.

public IFileSystemLinkWatcher CreateWatcher(bool recursive)

Result Type: IFileSystemLinkWatcher

Parameters

TypeName
boolrecursiveto watch directories, subdirectories, and files in path; otherwise, .

Deletes a specified directory, and optionally any subdirectories.

public void Delete(bool recursive)

Result Type: void

Parameters

TypeName
boolrecursiveto remove directories, subdirectories, and files in path; otherwise, .

Asynchronously deletes a specified directory, and optionally any subdirectories.

public Task DeleteAsync(bool recursive)

Result Type: Task

Parameters

TypeName
boolrecursiveto remove directories, subdirectories, and files in path; otherwise, .

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

TypeName
stringsearchPatternThe search options to match against the links to directories in current directory.
boolrecursiveto get links to directories in the current directory and all its subdirectories; otherwise, .

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

TypeName
stringsearchPatternThe search options to match against the links to directories in current directory.
boolrecursiveto get links to directories in the current directory and all its subdirectories; otherwise, .

Returns a link to the directory with specified relative full name.

public DirectoryLink GetDirectory(string relativeDirectoryName)

Result Type: DirectoryLink

Parameters

TypeName
stringrelativeDirectoryNameThe path under the .

Returns a link to the file/directory with specified relative full name.

public FileSystemStructureLink GetExistingLink(string relativeFullName)

Result Type: FileSystemStructureLink

Parameters

TypeName
stringrelativeFullName

Returns a link to the file with specified relative full name.

public FileLink GetFile(string relativeFileName)

Result Type: FileLink

Parameters

TypeName
stringrelativeFileNameThe name of file under the .

Retrieves a collection of links to files that match the specified search options.

public IList<FileLink> GetFiles(string searchPattern, bool recursive)

Result Type: IList<FileLink>

Parameters

TypeName
stringsearchPatternThe search options to match against the links to files in current directory.
boolrecursiveto get links to files in the current directory and all its subdirectories; otherwise, .

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

TypeName
stringsearchPatternThe search options to match against the links to files in current directory.
boolrecursiveto get links to files in the current directory and all its subdirectories; otherwise, .

Gets the information about the directory.

protected IFileSystemStructureLinkInfo GetInfo()

Result Type: IFileSystemStructureLinkInfo

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

TypeName
stringsearchPatternThe search options to match against the links to files and directories in current directory.
boolrecursiveto get links to files and directories in the current directory and all its subdirectories; otherwise, .

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

TypeName
stringsearchPatternThe search options to match against the links to files and directories in current directory.
boolrecursiveto get links to files and directories in the current directory and all its subdirectories; otherwise, .