Atypical.VirtualFileSystem.Core Assembly
Namespaces
Atypical.VirtualFileSystem.Core Namespace
- BinaryFileNode
Class Represents a binary file node in the virtual file system. Extends the standard file node to support binary content in addition to text.
- ChangeHistory
Class Represents a history of changes in a virtual file system.
- DirectoryNode
Class Represents a directory in the virtual file system.
- EventConfiguration
Class Configuration for event handling.
- AsyncEvents
Property Gets or sets whether events should be fired asynchronously. Default is false for synchronous events.
- Default
Property Gets the default event configuration.
- EnableDirectoryEvents
Property Gets or sets whether to enable directory operation events.
- EnableEvents
Property Gets or sets whether to enable all events. Default is true.
- EnableFileEvents
Property Gets or sets whether to enable file operation events.
- MaxEventHandlers
Property Gets or sets the maximum number of event handlers per event type. Default is 100. Set to 0 for unlimited.
- DirectoryEventsOnly()
Method Creates a configuration with only directory events enabled.
- Disabled()
Method Creates a configuration with all events disabled.
- FileEventsOnly()
Method Creates a configuration with only file events enabled.
- WithAsyncEvents()
Method Creates a configuration with asynchronous events.
- FileNode
Class Represents a file in the virtual file system.
- FileNode(VFSFilePath, string)
Constructor Initializes a new instance of the FileNode class. Creates a new file node. The file is created with the current date and time as creation and last modification date.
- Content
Property Gets the content of the file as a string. The encoding is in UTF-8.
- IsDirectory
Property Indicates whether the node is a directory.
- IsFile
Property Indicates whether the node is a file.
- ToString()
Method Returns a string that represents the path of the file.
- PathSeparatorConfiguration
Class Configuration for path separators.
- AllSeparators
Property Gets all accepted path separators.
- AlternativeSeparators
Property Gets or sets alternative path separators that are accepted. Default accepts both ‘/’ and ‘\’.
- Default
Property Gets the default path separator configuration.
- PrimarySeparator
Property Gets or sets the primary path separator. Default is ‘/’.
- UnixOnly()
Method Creates a configuration that only accepts forward slashes.
- WindowsOnly()
Method Creates a configuration that only accepts backslashes.
- RootNode
Class Represents the root directory of the virtual file system.
- RootNode()
Constructor Initializes a new instance of the RootNode class.
- ToString()
Method Returns a string that represents the current object. For RootNode this is always the constant string <cref see=”ROOT_PATH” />.
- VFS
Class Constants used by the Virtual File System.
- VFS()
Constructor Initializes a new instance of the VFS class.
- DIRECTORY_SEPARATOR
Field The directory separator. This is the character used to separate directory names.
- ROOT_PATH
Field The root path. This is the path used to identify the root directory.
- 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.
- CreateDirectory(VFSDirectoryPath)
Method Creates a directory node at the specified path. The path must be absolute.
- CreateFile(VFSFilePath, string)
Method Creates a file node at the specified path. The path must be absolute.
- DeleteDirectory(VFSDirectoryPath)
Method Deletes a directory node at the specified path. The path must be absolute.
- DeleteFile(VFSFilePath)
Method Deletes a file node at the specified path. The path must be absolute.
- 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.
- MoveDirectory(VFSDirectoryPath, VFSDirectoryPath)
Method Moves a directory from one location to another.
- MoveFile(VFSFilePath, VFSFilePath)
Method Moves a file node from the source path to the destination path. Both paths must be absolute.
- RenameDirectory(VFSDirectoryPath, string)
Method Renames a directory.
- RenameFile(VFSFilePath, string)
Method Renames a file node at the specified path. The path must be absolute.
- ToString()
Method Returns a string that represents the current object.
- 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.
- DirectoryCreated
Event Event triggered when a directory is created.
- DirectoryDeleted
Event Event triggered when a directory is deleted.
- DirectoryMoved
Event Event triggered when a directory is moved.
- DirectoryRenamed
Event Event triggered when a directory is renamed.
- FileCreated
Event Event triggered when a file is created.
- FileDeleted
Event Event triggered when a file is deleted.
- FileMoved
Event Event triggered when a file is moved.
- FileRenamed
Event Event triggered when a file is renamed.
- VFSConfiguration
Class Configuration options for the Virtual File System.
- CaseSensitive
Property Gets or sets whether file and directory operations are case sensitive. Default is false (case insensitive).
- Default
Property Gets the default VFS configuration.
- EnableChangeHistory
Property Gets or sets whether to enable change history tracking. Default is true.
- EnableIndexCaching
Property Gets or sets whether to enable index caching for performance. Default is true.
- Events
Property Gets or sets event handling configuration.
- MaxChangeHistorySize
Property Gets or sets the maximum number of operations to keep in change history. Default is 1000. Set to 0 for unlimited (not recommended).
- MaxFileSize
Property Gets or sets the maximum file size in bytes for content operations. Default is 1MB. Set to 0 for unlimited.
- MaxRecursionDepth
Property Gets or sets the maximum depth for recursive operations. Default is 100 to prevent infinite recursion.
- NormalizePaths
Property Gets or sets whether to normalize paths automatically. Default is true.
- PathComparison
Property Gets or sets the string comparison type for path operations.
- PathSeparators
Property Gets or sets custom path separators. Default uses forward slash.
- ValidatePaths
Property Gets or sets whether to validate paths on creation. Default is true.
- ForPerformance()
Method Creates a new configuration optimized for performance.
- ForSafety()
Method Creates a new configuration optimized for safety and validation.
- WithCaseInsensitivity()
Method Creates a new configuration with case insensitivity.
- WithCaseSensitivity()
Method Creates a new configuration with case sensitivity enabled.
- WithMaxFileSize(long)
Method Creates a new configuration with custom maximum file size.
- WithoutChangeHistory()
Method Creates a new configuration with change history disabled.
- VFSDirectoryCreatedArgs
Class Provides data for the DirectoryCreated event.
- VFSDirectoryDeletedArgs
Class Provides data for the DirectoryDeleted event.
- VFSDirectoryMovedArgs
Class Provides data for the DirectoryMoved event.
- VFSDirectoryPath
Class Represents a directory in the virtual file system. A directory is a first-class citizen in the virtual file system. It can contain files and other directories.
- VFSDirectoryRenamedArgs
Class Provides data for the DirectoryRenamed event.
- VFSEventArgs
Class Represents the base class for all VFS event arguments.
- VFSFileCreatedArgs
Class Provides data for the FileCreated event.
- VFSFileDeletedArgs
Class Provides data for the FileDeleted event.
- VFSFileMovedArgs
Class Provides data for the FileMoved event.
- VFSFilePath
Class Represents a file system entry in the virtual file system. A file is a first-class citizen in the virtual file system.
- VFSFileRenamedArgs
Class Provides data for the FileRenamed event.
- VFSIndex
Class Represents the index of the virtual file system.
- VFSNode
Class Represents a node in a virtual file system. A node can be a file or a directory.
- VFSNode(VFSPath)
Constructor Initializes a new instance of the VFSNode class. This constructor is used by derived classes.
- 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.
- Path
Property Gets the creation time of the node.
- UpdatePath(VFSPath)
Method Updates the path of the node.
- VFSPath
Class Represents a file system entry (file or directory) in the virtual file system.
- VFSPath(string)
Constructor Creates a new instance of VFSPath.
- Depth
Property Gets the depth of the file system entry. The root directory has a depth of 0. The depth of a file is the depth of its parent directory plus one. The depth of a directory is the depth of its parent directory plus one.
- HasParent
Property Indicates whether the path has a parent directory.
- IsRoot
Property Gets a value indicating whether the directory is the root directory.
- Name
Property Gets the name of the file system entry. The name of the root directory is ROOT_PATH. The name of a file is the name of the file with its extension.
- Parent
Property Gets the path of the parent directory.
- Value
Property Gets the path of the file system entry with the VFS prefix.
- Equals(VFSPath)
Method Indicates whether the current object is equal to another object of the same type.
- GetAbsoluteParentPath(int)
Method Gets the absolute path of the parent directory with depth depthFromRoot. The root directory has a depth of 0. The depth of a file is the depth of its parent directory plus one. The depth of a directory is the depth of its parent directory plus one.
- GetHashCode()
Method Serves as the default hash function.
- IsMatch(Regex)
Method Indicates whether the specified regular expression finds a match in the path.
- StartsWith(string)
Method Determines whether the path starts with the specified path.
- VFSRootPath
Class Represents the root directory of the virtual file system.
- VirtualFileSystemException
Class Exception thrown by the VFS.
- VirtualFileSystemFactory
Class Represents a factory for creating IVirtualFileSystem instances.
- Result
Struct Represents the result of an operation that can either succeed or fail without a return value.
- Error
Property Gets the error message. Only available when IsFailure is true.
- IsFailure
Property Gets a value indicating whether the operation failed.
- IsSuccess
Property Gets a value indicating whether the operation was successful.
- Combine(Result)
Method Combines this result with another result.
- Failure(string)
Method Creates a failed result with the specified error message.
- Failure(Exception)
Method Creates a failed result from an exception.
- Map<T>(Func<T>)
Method Transforms the result to a result with a value.
- OnFailure(Action<string>)
Method Executes an action if the result is a failure.
- OnSuccess(Action)
Method Executes an action if the result is successful.
- Success()
Method Creates a successful result.
- ToString()
Method Returns a string representation of the result.
- Result<T>
Struct Represents the result of an operation that can either succeed or fail without throwing exceptions.
- IBinaryFileNode
Interface Interface for binary file nodes that support both text and binary content.
- IChangeHistory
Interface Represents a history of changes in a virtual file system.
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
- FileInfo
Class Represents information about a file in the virtual file system.
- VFSAdvancedExtensions
Class Provides advanced extension methods for IVirtualFileSystem with smart behavior like auto-creating parent directories.
- CopyDirectory(this IVirtualFileSystem, string, string)
Method Copies a directory and all its contents recursively.
- CopyFile(this IVirtualFileSystem, string, string)
Method Copies a file from source to destination, creating parent directories if needed.
- CreateDirectoryRecursively(this IVirtualFileSystem, string)
Method Creates a directory and automatically creates any missing parent directories.
- CreateFileWithDirectories(this IVirtualFileSystem, string, string)
Method Creates a file and automatically creates any missing parent directories.
- GetAllDirectoriesRecursive(this IVirtualFileSystem)
Method Gets all directories in the file system recursively.
- GetAllFilesRecursive(this IVirtualFileSystem)
Method Gets all files in the file system recursively.
- GetDirectoriesRecursive(this IVirtualFileSystem, string)
Method Gets all directories in a specific directory recursively.
- GetFilesRecursive(this IVirtualFileSystem, string)
Method Gets all files in a specific directory recursively.
- TryCopyDirectory(this IVirtualFileSystem, string, string)
Method Safely copies a directory and all its contents recursively.
- TryCopyFile(this IVirtualFileSystem, string, string)
Method Safely copies a file from source to destination, creating parent directories if needed.
- TryCreateDirectoryRecursively(this IVirtualFileSystem, string)
Method Safely creates a directory and automatically creates any missing parent directories.
- TryCreateFileWithDirectories(this IVirtualFileSystem, string, string)
Method Safely creates a file and automatically creates any missing parent directories.
- VFSBinaryExtensions
Class Provides extension methods for handling binary files in the Virtual File System.
- ConvertToBinary(this IVirtualFileSystem, string, Encoding)
Method Converts a text file to binary format.
- ConvertToText(this IVirtualFileSystem, string, Encoding)
Method Converts a binary file to text format.
- CreateBinaryFile(this IVirtualFileSystem, string, byte[])
Method Creates a binary file with the specified path and binary content.
- CreateBinaryFileFromBase64(this IVirtualFileSystem, string, string)
Method Creates a binary file from a base64 encoded string.
- CreateBinaryFileWithDirectories(this IVirtualFileSystem, string, byte[])
Method Creates a binary file with auto-created directories.
- GetFileInfo(this IVirtualFileSystem, string)
Method Gets file information including type and size.
- GetFileSize(this IVirtualFileSystem, string)
Method Gets the size of a file in bytes.
- IsBinaryFile(this IVirtualFileSystem, string)
Method Checks if a file contains binary data.
- TryCreateBinaryFile(this IVirtualFileSystem, string, byte[])
Method Safely creates a binary file without throwing exceptions.
- TryReadBinaryFile(this IVirtualFileSystem, string, byte[])
Method Reads binary content from a file if it contains binary data.
- TryWriteBinaryFile(this IVirtualFileSystem, string, byte[])
Method Writes binary content to an existing file.
- VFSBulkExtensions
Class Provides bulk operation extension methods for IVirtualFileSystem for efficient batch processing.
- CreateDirectories(this IVirtualFileSystem, IEnumerable<string>, bool)
Method Creates multiple directories efficiently in a single operation.
- CreateFiles(this IVirtualFileSystem, IDictionary<string,string>, bool)
Method Creates multiple files efficiently in a single operation using a dictionary.
- DeleteDirectories(this IVirtualFileSystem, IEnumerable<string>)
Method Deletes multiple directories efficiently in a single operation.
- DeleteFiles(this IVirtualFileSystem, IEnumerable<string>)
Method Deletes multiple files efficiently in a single operation.
- TryCreateDirectories(this IVirtualFileSystem, IEnumerable<string>, bool)
Method Safely creates multiple directories without throwing exceptions.
- TryDeleteDirectories(this IVirtualFileSystem, IEnumerable<string>)
Method Safely deletes multiple directories without throwing exceptions.
- TryDeleteFiles(this IVirtualFileSystem, IEnumerable<string>)
Method Safely deletes multiple files without throwing exceptions.
- VFSConvenienceExtensions
Class Provides convenience extension methods for IVirtualFileSystem to simplify common operations. These methods accept string paths directly and handle common use cases with less boilerplate.
- CreateDirectory(this IVirtualFileSystem, string)
Method Creates a directory with the specified path using a string path.
- CreateFile(this IVirtualFileSystem, string, string)
Method Creates a file with the specified path and content using a string path.
- DeleteDirectory(this IVirtualFileSystem, string)
Method Deletes a directory with the specified path using a string path.
- DeleteFile(this IVirtualFileSystem, string)
Method Deletes a file with the specified path using a string path.
- DirectoryExists(this IVirtualFileSystem, string)
Method Checks if a directory exists at the specified path.
- Exists(this IVirtualFileSystem, string)
Method Checks if a file or directory exists at the specified path.
- FileExists(this IVirtualFileSystem, string)
Method Checks if a file exists at the specified path.
- GetDirectory(this IVirtualFileSystem, string)
Method Gets a directory by its path using a string path.
- GetFile(this IVirtualFileSystem, string)
Method Gets a file by its path using a string path.
- MoveDirectory(this IVirtualFileSystem, string, string)
Method Moves a directory from source to destination using string paths.
- MoveFile(this IVirtualFileSystem, string, string)
Method Moves a file from source to destination using string paths.
- RenameDirectory(this IVirtualFileSystem, string, string)
Method Renames a directory using string paths.
- RenameFile(this IVirtualFileSystem, string, string)
Method Renames a file using string paths.
- TryGetDirectory(this IVirtualFileSystem, string, IDirectoryNode)
Method Tries to get a directory by its path using a string path.
- TryGetFile(this IVirtualFileSystem, string, IFileNode)
Method Tries to get a file by its path using a string path.
- VFSPathExtensions
Class Provides path manipulation and utility extension methods for VFS paths.
- ChangeExtension(this VFSPath, string)
Method Changes the extension of a VFS path.
- Combine(this VFSDirectoryPath, string)
Method Combines a directory path with a relative path.
- GetAncestors(this VFSPath)
Method Gets all ancestor paths from the current path up to the root.
- GetDepth(this VFSPath)
Method Gets the depth of the path (number of directory levels from root).
- GetExtension(this VFSPath)
Method Gets the file extension from a VFS path.
- GetFileNameWithoutExtension(this VFSPath)
Method Gets the file name without extension from a VFS path.
- GetParent(this VFSPath, int)
Method Gets the parent directory at the specified level up.
- GetRelativePath(this VFSDirectoryPath, VFSPath)
Method Gets the relative path from one directory to another.
- HasAnyExtension(this VFSPath, string[])
Method Checks if the path has any of the specified extensions.
- HasExtension(this VFSPath, string, bool)
Method Checks if the path has a specific extension.
- IsAncestorOf(this VFSPath, VFSPath)
Method Checks if a path is a descendant of another path.
- IsAtDepth(this VFSPath, int)
Method Checks if the path is at a specific depth.
- IsDirectChildOf(this VFSPath, VFSPath)
Method Checks if a path is a child (direct descendant) of another path.
- MatchesGlob(this VFSPath, string)
Method Checks if the path matches a glob pattern.
- Normalize(string)
Method Normalizes a path by removing redundant separators and resolving relative components.
- VFSResultExtensions
Class Provides Result pattern extension methods for IVirtualFileSystem operations. These methods return Result objects instead of throwing exceptions, enabling functional error handling.
- CopyDirectoryResult(this IVirtualFileSystem, string, string)
Method Copies a directory and returns a Result indicating success or failure.
- CopyFileResult(this IVirtualFileSystem, string, string)
Method Copies a file and returns a Result indicating success or failure.
- CreateDirectoryRecursivelyResult(this IVirtualFileSystem, string)
Method Creates a directory recursively and returns a Result.
- CreateDirectoryResult(this IVirtualFileSystem, string)
Method Creates a directory and returns a Result indicating success or failure.
- CreateFileResult(this IVirtualFileSystem, string, string)
Method Creates a file and returns a Result indicating success or failure.
- CreateFileWithDirectoriesResult(this IVirtualFileSystem, string, string)
Method Creates a file with auto-created directories and returns a Result.
- DeleteDirectoryResult(this IVirtualFileSystem, string)
Method Deletes a directory and returns a Result indicating success or failure.
- DeleteFileResult(this IVirtualFileSystem, string)
Method Deletes a file and returns a Result indicating success or failure.
- Execute(Action)
Method Executes an operation and returns a Result, converting any exception to a failure.
- Execute<T>(Func<T>)
Method Executes an operation that returns a value and returns a Result.
- GetDirectoryResult(this IVirtualFileSystem, string)
Method Gets a directory and returns a Result containing the directory or an error.
- GetFileResult(this IVirtualFileSystem, string)
Method Gets a file and returns a Result containing the file or an error.
- MoveDirectoryResult(this IVirtualFileSystem, string, string)
Method Moves a directory and returns a Result indicating success or failure.
- MoveFileResult(this IVirtualFileSystem, string, string)
Method Moves a file and returns a Result indicating success or failure.
- ReadFileResult(this IVirtualFileSystem, string)
Method Reads file content and returns a Result containing the content or an error.
- RenameDirectoryResult(this IVirtualFileSystem, string, string)
Method Renames a directory and returns a Result indicating success or failure.
- RenameFileResult(this IVirtualFileSystem, string, string)
Method Renames a file and returns a Result indicating success or failure.
- WriteFileResult(this IVirtualFileSystem, string, string)
Method Writes file content and returns a Result indicating success or failure.
- VFSSafeExtensions
Class Provides safe extension methods for IVirtualFileSystem that don’t throw exceptions. These methods return boolean success indicators instead of throwing exceptions.
- TryCreateDirectory(this IVirtualFileSystem, string)
Method Safely creates a directory without throwing exceptions.
- TryCreateFile(this IVirtualFileSystem, string, string)
Method Safely creates a file without throwing exceptions.
- TryDeleteDirectory(this IVirtualFileSystem, string)
Method Safely deletes a directory without throwing exceptions.
- TryDeleteFile(this IVirtualFileSystem, string)
Method Safely deletes a file without throwing exceptions.
- TryMoveDirectory(this IVirtualFileSystem, string, string)
Method Safely moves a directory without throwing exceptions.
- TryMoveFile(this IVirtualFileSystem, string, string)
Method Safely moves a file without throwing exceptions.
- TryReadFile(this IVirtualFileSystem, string, string)
Method Safely reads file content without throwing exceptions.
- TryRenameDirectory(this IVirtualFileSystem, string, string)
Method Safely renames a directory without throwing exceptions.
- TryRenameFile(this IVirtualFileSystem, string, string)
Method Safely renames a file without throwing exceptions.
- TryWriteFile(this IVirtualFileSystem, string, string)
Method Safely writes file content without throwing exceptions.
- VFSSearchExtensions
Class Provides fluent search extension methods for IVirtualFileSystem and file/directory collections.
- AtDepth(this IEnumerable<IDirectoryNode>, int)
Method Filters directories by path depth.
- ContainingPattern(this IEnumerable<IFileNode>, string, RegexOptions)
Method Filters files by content matching a regular expression.
- ContainingText(this IEnumerable<IFileNode>, string, bool)
Method Filters files by content containing specific text.
- CreatedBetween(this IEnumerable<IFileNode>, Nullable<DateTime>, Nullable<DateTime>)
Method Filters files by creation time range.
- Empty(this IEnumerable<IDirectoryNode>)
Method Filters directories that are empty (no files or subdirectories).
- FindDirectoriesByGlob(this IVirtualFileSystem, string)
Method Searches directories using glob pattern matching.
- FindFilesByGlob(this IVirtualFileSystem, string)
Method Searches files using glob pattern matching.
- InDirectory(this IEnumerable<IFileNode>, string, bool)
Method Filters files by directory path.
- ModifiedBetween(this IEnumerable<IFileNode>, Nullable<DateTime>, Nullable<DateTime>)
Method Filters files modified within a specific time range.
- WithExtension(this IEnumerable<IFileNode>, string)
Method Filters files by extension.
- WithExtensions(this IEnumerable<IFileNode>, string[])
Method Filters files by multiple extensions.
- WithMinFileCount(this IEnumerable<IDirectoryNode>, int)
Method Filters directories containing a minimum number of files.
- WithNameContaining(this IEnumerable<IDirectoryNode>, string, bool)
Method Filters directories by name containing specific text.
- WithNameContaining(this IEnumerable<IFileNode>, string, bool)
Method Filters files by name containing specific text.
- WithNameEndingWith(this IEnumerable<IFileNode>, string, bool)
Method Filters files by name ending with specific text.
- WithNameStartingWith(this IEnumerable<IFileNode>, string, bool)
Method Filters files by name starting with specific text.
- WithSizeInRange(this IEnumerable<IFileNode>, int, int)
Method Filters files by size range.
Atypical.VirtualFileSystem.Core.Services Namespace