Custom file system

The FileSystem class allows to create custom file system by passing instance of class implemented IFileSystemReadOperations or IFileSystemOperations operations.

Example implementation:

var fileSystem = new FileSystem(new CustomFileSystemOperations());


internal class CustomFileSystemOperations : IFileSystemOperations, IFileSystemHistoryOperations
{
    // Implementation
}

File system operations interfaces

InterfaceDescription
IFileSystemReadOperationsProvides methods for reading files / directories, e.g. ReadFile, GetLinkInfo, GetLinks.
IFileSystemOperationsProvides methods for writing, moving or deleting files; create, move or delete directories and update metadata files / directories.
IFileSystemPermissionsOperationsProvides methods HasReadAccess and HasWriteAccess for checking files permissions.
IFileSystemWatchOperationsProvides methods CreateFileWatcher and CreateDirectoryWatcher to watch files/directories changes.
IFileSystemHistoryOperationsProvides files/directories history methods e.g. ReadFileVersion, CreateFileVersion, DeleteFileVersion, ReadFileVersion, GetFileVersions.
IFileSystemAsyncReadOperationsProvides asynchronous equivalents of IFileSystemReadOperations methods.
IFileSystemAsyncOperationsProvides asynchronous equivalents of IFileSystemOperations methods.
IFileSystemHistoryAsyncOperationsProvides asynchronous equivalents of IFileSystemHistoryOperations methods.