Skip to content
Auto
Products

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.FileSystemStructureLink

Inheritance: objectFileSystemStructureLink → DirectoryLink

public virtual FileSystemLinkType Type { get; }

FileSystemLinkType

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

public void Create()

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

public Task CreateAsync()

Task

The task object representing the asynchronous operation.

Creates a directory watcher for current link.

public IFileSystemLinkWatcher CreateWatcher(bool recursive)
  • recursive bool
    true to watch directories, subdirectories, and files in the path; otherwise, false.

IFileSystemLinkWatcher

A IFileSystemLinkWatcher object for listening to a directory change notifications and raises events when a directory changes.

Deletes a specified directory, and optionally any subdirectories.

public void Delete(bool recursive)
  • recursive bool
    true to remove directories, subdirectories, and files in the path; otherwise, false.

Asynchronously deletes a specified directory, and optionally any subdirectories.

public Task DeleteAsync(bool recursive)
  • recursive bool
    true to remove directories, subdirectories, and files in the path; otherwise, false.

Task

The task object representing the asynchronous operation.

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

public IList<DirectoryLink> GetDirectories(string searchPattern, bool recursive)
  • searchPattern string
    The search options to match against the links to directories in current directory.
  • recursive bool
    true to get links to directories in the current directory and all its subdirectories; otherwise, false.

IList<DirectoryLink>

A collection of links to the directories.

Asynchronously retrieves a collection of links to directories that match the specified search options.

public Task<IList<DirectoryLink>> GetDirectoriesAsync(string searchPattern, bool recursive)
  • searchPattern string
    The search options to match against the links to directories in current directory.
  • recursive bool
    true to get links to directories in the current directory and all its subdirectories; otherwise, false.

Task<IList<DirectoryLink>>

The task object representing the asynchronous operation. The value of the parameter contains a collection of links to the directories.

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

public DirectoryLink GetDirectory(string relativeDirectoryName)

DirectoryLink

A DirectoryLink object representing a link to the directory.

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

public Task<DirectoryLink> GetDirectoryAsync(string relativeDirectoryName)

Task<DirectoryLink>

A Task of DirectoryLink object representing a link to the directory.

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

public FileSystemStructureLink GetExistingLink(string relativeFullName)

FileSystemStructureLink

A FileSystemStructureLink object representing a link to the file/directory.

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

public Task<FileSystemStructureLink> GetExistingLinkAsync(string relativeFullName)

Task<FileSystemStructureLink>

A Task of FileSystemStructureLink object representing a link to the file/directory.

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

public FileLink GetFile(string relativeFileName)

FileLink

A FileLink object representing a link to a file.

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

public Task<FileLink> GetFileAsync(string relativeFileName)

Task<FileLink>

A Task of FileLink object representing a link to a file.

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

public IList<FileLink> GetFiles(string searchPattern, bool recursive)
  • searchPattern string
    The search options to match against the links to files in current directory.
  • recursive bool
    true to get links to files in the current directory and all its subdirectories; otherwise, false.

IList<FileLink>

A collection of links to the files.

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

public Task<IList<FileLink>> GetFilesAsync(string searchPattern, bool recursive)
  • searchPattern string
    The search options to match against the links to files in current directory.
  • recursive bool
    true to get links to files in the current directory and all its subdirectories; otherwise, false.

Task<IList<FileLink>>

The task object representing the asynchronous operation. The value of the parameter contains a collection of links to the files.

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

public IList<FileSystemStructureLink> GetLinks(string searchPattern, bool recursive)
  • searchPattern string
    The search options to match against the links to files and directories in current directory.
  • recursive bool
    true to get links to files and directories in the current directory and all its subdirectories; otherwise, false.

IList<FileSystemStructureLink>

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)
  • searchPattern string
    The search options to match against the links to files and directories in current directory.
  • recursive bool
    true to get links to files and directories in the current directory and all its subdirectories; otherwise, false.

Task<IList<FileSystemStructureLink>>

The task object representing the asynchronous operation. The value of the parameter contains