Skip to content
Auto
Products

FileSystem

Namespace: TagBites.IO
Assembly: TagBites.IO.dll
Product: TagBites.IO v. 2.0.0

Represents the file system contains the procedures that are used to perform file, directory or file version operations.

public sealed class FileSystem : System.IDisposable

Inheritance: object → FileSystem

Initializes a new instance of the FileSystem class for a specified file system operations.

public FileSystem(IFileSystemOperations operations)

Gets the optional features supported by the file system.

public FileSystemFeatures Features { get; }

FileSystemFeatures

Gets a kind of the filesystem.

public string Kind { get; }

string

Gets the local file system.

public static FileSystem Local { get; }

FileSystem

A FileSystem object representing the local file system.

Gets a name of the filesystem.

public string Name { get; }

string

Gets a link to the top directory of the file system, or null when the file system has no single top directory.

public DirectoryLink Root { get; }

DirectoryLink

Reading this property asks the file system to resolve the directory separator. The returned link carries the loaded information, so FileSystemStructureLink.Exists costs no further request. The local file system on Windows has no single top directory, because a path made only of the separator resolves against the current drive.

public virtual void Dispose()

Returns a link to directory.

public DirectoryLink GetDirectory(string fullName)
  • fullName string
    Full name including parent directories.

DirectoryLink

Returns a link to directory with loaded information.

public Task<DirectoryLink> GetDirectoryAsync(string fullName)
  • fullName string
    Full name including parent directories.

Task<DirectoryLink>

The returned link carries the same FileSystemStructureLink.FullName as the one from GetDirectory(string).

Returns a link to existing file/directory.

public FileSystemStructureLink GetExisting(string fullName)
  • fullName string
    Full name including directory.

FileSystemStructureLink

Returns a link to existing file/directory with loaded information.

public Task<FileSystemStructureLink> GetExistingAsync(string fullName)
  • fullName string
    Full name including directory.

Task<FileSystemStructureLink>

Returns a link to file.

public FileLink GetFile(string fullName)
  • fullName string
    Full name including directory.

FileLink

Returns a link to file with loaded information.

public Task<FileLink> GetFileAsync(string fullName)
  • fullName string
    Full name including directory.

Task<FileLink>

The returned link carries the same FileSystemStructureLink.FullName as the one from GetFile(string).

Occurs when a file/directory is changed.

public EventHandler<FileSystemLinkChangeEventArgs> Changed

EventHandler<FileSystemLinkChangeEventArgs>

Occurs when a file/directory is changing.

public EventHandler<FileSystemLinkChangeEventArgs> Changing

EventHandler<FileSystemLinkChangeEventArgs>

Occurs when a file/directory is created.

public EventHandler<FileSystemLinkChangeEventArgs> Created

EventHandler<FileSystemLinkChangeEventArgs>

Occurs when a file/directory is creating.

public EventHandler<FileSystemLinkChangeEventArgs> Creating

EventHandler<FileSystemLinkChangeEventArgs>

Occurs when a file/directory is deleted.

public EventHandler<FileSystemLinkChangeEventArgs> Deleted

EventHandler<FileSystemLinkChangeEventArgs>

Occurs when a file/directory is deleting.

public EventHandler<FileSystemLinkChangeEventArgs> Deleting

EventHandler<FileSystemLinkChangeEventArgs>

Occurs when a file/directory is moved.

public EventHandler<FileSystemLinkMoveEventArgs> Moved

EventHandler<FileSystemLinkMoveEventArgs>

Occurs when a file/directory is moving.

public EventHandler<FileSystemLinkMoveEventArgs> Moving

EventHandler<FileSystemLinkMoveEventArgs>