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().
public interface IVirtualFileSystem : Atypical.VirtualFileSystem.Core.Contracts.IVFSCreate, Atypical.VirtualFileSystem.Core.Contracts.IVFSDelete, Atypical.VirtualFileSystem.Core.Contracts.IVFSMove, Atypical.VirtualFileSystem.Core.Contracts.IVFSRenameDerived
↳ VFS
Implements IVFSCreate, IVFSDelete, IVFSMove, IVFSRename
| Properties | |
|---|---|
| ChangeHistory | Gets the change history of the file system. |
| Directories | Finds all directory nodes. |
| Files | Finds all file nodes. |
| Index | 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 | Indicates whether the file system is empty. This is the case if the root directory is empty. |
| Root | Gets the root directory of the file system. This is the entry point for all operations on the file system. |
| RootPath | Gets the path of the root directory. |
| Methods | |
|---|---|
| FindDirectories(Func<IDirectoryNode,bool>) | Finds all directory nodes that match the specified predicate. |
| FindDirectories(Regex) | Finds all directory nodes that match the specified regular expression. The regular expression must be relative to the root directory. |
| FindFiles(Func<IFileNode,bool>) | Finds all file nodes that match the specified predicate. |
| FindFiles(Regex) | Finds all file nodes that match the specified regular expression. |
| GetDirectory(VFSDirectoryPath) | Gets a directory node by its path. The path must be absolute. |
| GetFile(VFSFilePath) | Gets a file node by its path. The path must be absolute. |
| GetTree() | Gets the tree of the file system. |
| TryGetDirectory(VFSDirectoryPath, IDirectoryNode) | 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) | Try to get a file node by its path. The path must be absolute. |