Skip to content

Latest commit

 

History

History
487 lines (478 loc) · 122 KB

File metadata and controls

487 lines (478 loc) · 122 KB

Atypical.VirtualFileSystem.Core Assembly

Namespaces

Atypical.VirtualFileSystem.Core Namespace

Atypical.VirtualFileSystem.Core.Contracts Namespace

  • IDirectoryNode Interface Represents a directory in a virtual file system. This is an in-memory representation of a directory. It is not a representation of a directory on a physical file system.
  • IFileNode Interface Represents a file in a virtual file system. This is the base interface for all file types.
    • Content Property Gets the content of the file as a string. The encoding is in UTF-8.
  • IRootNode Interface Represents the root of a virtual file system. This is the entry point for all operations on the file system.
  • IVFSCreate Interface Represents the creation operations of the virtual file system.
  • IVFSDelete Interface Represents the deletion operations of the virtual file system.
  • IVFSMove Interface Represents the move operations of the virtual file system.
  • IVFSRename Interface Represents the rename operations of the virtual file system.
  • IVirtualFileSystem Interface Represents a virtual file system. This is the main entry point for all operations on the file system. You can get an instance of this interface by calling CreateFileSystem().
    • ChangeHistory Property Gets the change history of the file system.
    • Directories Property Finds all directory nodes.
    • Files Property Finds all file nodes.
    • Index Property Gets the file index of the file system. Basically, this is a dictionary that maps file paths to file nodes. This is useful for quickly finding a file node by its path.
    • IsEmpty Property Indicates whether the file system is empty. This is the case if the root directory is empty.
    • Root Property Gets the root directory of the file system. This is the entry point for all operations on the file system.
    • RootPath Property Gets the path of the root directory.
    • FindDirectories(Func<IDirectoryNode,bool>) Method Finds all directory nodes that match the specified predicate.
    • FindDirectories(Regex) Method Finds all directory nodes that match the specified regular expression. The regular expression must be relative to the root directory.
    • FindFiles(Func<IFileNode,bool>) Method Finds all file nodes that match the specified predicate.
    • FindFiles(Regex) Method Finds all file nodes that match the specified regular expression.
    • GetDirectory(VFSDirectoryPath) Method Gets a directory node by its path. The path must be absolute.
    • GetFile(VFSFilePath) Method Gets a file node by its path. The path must be absolute.
    • GetTree() Method Gets the tree of the file system.
    • TryGetDirectory(VFSDirectoryPath, IDirectoryNode) Method Try to get a directory node by its path. The path must be absolute. If the directory node does not exist, this method returns false and directory is set to null.
    • TryGetFile(VFSFilePath, IFileNode) Method Try to get a file node by its path. The path must be absolute.
  • IVirtualFileSystemFactory Interface Represents a factory for creating IVirtualFileSystem instances. This interface is implemented by the VirtualFileSystemFactory class.
  • IVirtualFileSystemNode Interface Represents a node in a virtual file system. A node can be a file or a directory.
    • CreationTime Property Gets the creation time of the node.
    • IsDirectory Property Indicates whether the node is a directory.
    • IsFile Property Indicates whether the node is a file.
    • LastAccessTime Property Gets the last access time of the node.
    • LastWriteTime Property Gets the last write time of the node.
    • Name Property Gets the name of the virtual file system node. The name is the last part of the path. For example, the name of the file "vfs://temp/file.txt" is "file.txt". The name of the directory "vfs://temp" is "temp".
    • Path Property Gets the full path of the node. The path is the path from the root of the file system to the node. For example, the path of the node with the path "./temp/file.txt" is "./temp/file.txt". The path of the node with the path "./temp/" is "./temp/".

Atypical.VirtualFileSystem.Core.Extensions Namespace

Atypical.VirtualFileSystem.Core.Services Namespace