VDirectoryInfo Class
Namespace: Rebex.IO
Assembly: Rebex.FileSystem.dll (version 7.0.9119)
Class represents a directory in the virtual file system. This class provides properties and methods that are functionally similar to the standard .NET DirectoryInfo properties and methods.
Syntax
public sealed class VDirectoryInfo : VFileSystemInfo
Inherited Members
Examples
//Create a built-in or custom VFS provider
var memoryProvider = new MemoryFileSystemProvider()
//Save the root path
var memoryProviderRootPath = memoryProvider.GetRootVDirectoryInfo().FullName;
//Create new directory 'Data' in the root directory
VDirectoryInfo dataDirInfo = new VDirectoryInfo(Path.Combine(memoryProviderRootPath, "Data"));
dataDirInfo.Create();
Constructors
| Name | Description |
|---|---|
| VDirectoryInfo(String) | Initializes a new instance of the VDirectoryInfo |
Fields
| Name | Description |
|---|---|
| FullPath | Full path of the node. Inherited from VFileSystemInfo. |
| OriginalPath | Original path of the node.
|
Properties
| Name | Description |
|---|---|
| Attributes | Gets or sets the attributes for the file or directory. Inherited from VFileSystemInfo. |
| CreationTime | Gets or sets the creation date and time for the file or directory. Inherited from VFileSystemInfo. |
| CreationTimeUtc | Gets or sets the creation date and time for the file or directory. The time is expressed in the UTC format. Inherited from VFileSystemInfo. |
| Exists | Method returns true when the file or directory exists; otherwise returns false. Inherited from VFileSystemInfo. |
| Extension | Gets the extension of the file. Inherited from VFileSystemInfo. |
| FullName | Gets the full path of the file. Inherited from VFileSystemInfo. |
| LastAccessTime | Gets or sets the last access date and time for the file or directory. Inherited from VFileSystemInfo. |
| LastAccessTimeUtc | Gets or sets the last access date and time for the file or directory. The time is expressed in the UTC format. Inherited from VFileSystemInfo. |
| LastWriteTime | Gets or sets the last write date and time for the file or directory. Inherited from VFileSystemInfo. |
| LastWriteTimeUtc | Gets or sets the last write date and time for the file or directory. The time is expressed in the UTC format. Inherited from VFileSystemInfo. |
| Name | Gets the name of the file or directory. Inherited from VFileSystemInfo. |
| Parent | Gets an instance of the VDirectoryInfo class that represents the parent of this directory. When this directory represents a root directory then returns null. |
| Root | Gets an instance of the VDirectoryInfo that represents the root directory. |
Methods
| Name | Description |
|---|---|
| Create() | Method creates a directory. Any non-existent parent directory is created as well. |
| CreateSubdirectory(String) | Method creates a subdirectory for the specified |
| Delete() | Deletes a directory. |
| Delete(Boolean) | Deletes a directory. |
| EnumerateDirectories() | Returns an enumerator that yields instances of the VDirectoryInfo that are located in a directory. |
| EnumerateDirectories(String) | Returns an enumerator that yields instances of the VDirectoryInfo that are located in a directory. |
| EnumerateDirectories(String, SearchOption) | Returns an enumerator that yields instances of the VDirectoryInfo
that are located in a directory
and their name matches the given |
| EnumerateFiles() | Returns an enumerator that yields instances of the VFileInfo that are located in a directory. |
| EnumerateFiles(String) | Returns an enumerator that yields instances of the VFileInfo
that are located in a directory
and their name matches the given |
| EnumerateFiles(String, SearchOption) | Returns an enumerator that yields instances of the VFileInfo
that are located in a directory
and their name matches the given |
| EnumerateFileSystemInfos() | Returns an enumerator that yields instances of the VFileSystemInfo that are located in a directory. |
| EnumerateFileSystemInfos(String) | Returns an enumerator that yields instances of the VFileSystemInfo
that are located in a directory
and their name matches the given |
| EnumerateFileSystemInfos(String, SearchOption) | Returns an enumerator that yields instances of the VFileSystemInfo
that are located in a directory
and their name matches the given |
| GetDirectories() | Returns an array that contains instances of the VDirectoryInfo that are located in a directory. |
| GetDirectories(String) | Returns an array that contains instances of the VDirectoryInfo
that are located in a directory
and their name matches the given |
| GetDirectories(String, SearchOption) | Returns an array that contains instances of the VDirectoryInfo
that are located in a directory
and their name matches the given |
| GetFiles() | Returns an array that contains instances of the VFileInfo that are located in a directory. |
| GetFiles(String) | Returns an array that contains full paths to files
that are located in a directory
and their name matches the given |
| GetFiles(String, SearchOption) | Returns an array that contains instances of the VFileInfo
that are located in a directory
and their name matches the given |
| GetFileSystemInfos() | Returns an array that contains instances of the VFileSystemInfo that are located in a directory. |
| GetFileSystemInfos(String) | Returns an array that contains full paths to instances of the VFileSystemInfo
that are located in a directory
and their name matches the given |
| GetFileSystemInfos(String, SearchOption) | Returns an array that contains instances of the VFileSystemInfo
that are located in a directory
and their name matches the given |
| MoveTo(String) | Method moves a directory to the location denoted by the |
| Refresh() | Method tries to refresh values of properties in this instance. Inherited from VFileSystemInfo. |
| ToString() | Method returns the full path of the directory or file. Inherited from VFileSystemInfo. |