Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

VDirectory Class

Namespace: Rebex.IO
Assembly: Rebex.FileSystem.dll (version 7.0.9119)

This class contains static methods that work with virtual file system directories. This class provides methods that are functionally similar to the standard .NET Directory methods.

Syntax
public static class VDirectory
Inheritance
Object
VDirectory
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
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
VDirectory.CreateDirectory(Path.Combine(memoryProviderRootPath, "Data"));

Methods

Name Description
CreateDirectory(String)

Method creates a directory denoted by the path. Any non-existent parent directory on the path is created as well.

Delete(String)

Deletes a directory identified by the path.

Delete(String, Boolean)

Deletes a directory identified by the path.

EnumerateDirectories(String)

Returns an enumerator that yields full paths to directories that are located in the directory identified by the path.

EnumerateDirectories(String, String)

Returns an enumerator that yields full paths to directories that are located in the directory identified by the path and their name matches the given searchPattern.

EnumerateDirectories(String, String, SearchOption)

Returns an enumerator that yields full paths to directories that are located in the directory identified by the path and their name matches the given searchPattern. When the searchPattern has value AllDirectories then this method returns all subdirectories recursively; otherwise returns only directories on the first level of the hierarchy.

EnumerateFiles(String)

Returns an enumerator that yields full paths to files that are located in the directory identified by the path.

EnumerateFiles(String, String)

Returns an enumerator that yields full paths to files that are located in the directory identified by the path and their name matches the given searchPattern.

EnumerateFiles(String, String, SearchOption)

Returns an enumerator that yields full paths to files that are located in the directory identified by the path and their name matches the given searchPattern. When the searchPattern has value AllDirectories then this method returns all files recursively; otherwise returns only files on the first level of the hierarchy.

EnumerateFileSystemEntries(String)

Returns an enumerator that yields full paths to file system entries that are located in the directory identified by the path.

EnumerateFileSystemEntries(String, String)

Returns an enumerator that yields full paths to file system entries that are located in the directory identified by the path and their name matches the given searchPattern.

EnumerateFileSystemEntries(String, String, SearchOption)

Returns an enumerator that yields full paths to file system entries that are located in the directory identified by the path and their name matches the given searchPattern. When the searchPattern has value AllDirectories then this method returns all file system entries recursively; otherwise returns only file system entries on the first level of the hierarchy.

Exists(String)

Method returns true when a directory exists on the given path; otherwise returns false.

GetCreationTime(String)

Method returns the creation date and time of the directory.

GetCreationTimeUtc(String)

Method returns the creation date and time of the directory. The time is expressed in the UTC format.

GetDirectories(String)

Returns an array that contains full paths to directories that are located in the directory identified by the path.

GetDirectories(String, String)

Returns an array that contains full paths to directories that are located in the directory identified by the path and their name matches the given searchPattern.

GetDirectories(String, String, SearchOption)

Returns an array that contains full paths to directories that are located in the directory identified by the path and their name matches the given searchPattern. When the searchPattern has value AllDirectories then this method returns all subdirectories recursively; otherwise returns only directories on the first level of the hierarchy.

GetDirectoryRoot(String)

Method returns the root path of the virtual file system VDriveInfo object to which the directory, identified by the path, belongs.

GetFiles(String)

Returns an array that contains full paths to files that are located in the directory identified by the path.

GetFiles(String, String)

Returns an array that contains full paths to files that are located in the directory identified by the path and their name matches the given searchPattern.

GetFiles(String, String, SearchOption)

Returns an array that contains full paths to files that are located in the directory identified by the path and their name matches the given searchPattern. When the searchPattern has value AllDirectories then this method returns all files recursively; otherwise returns only files on the first level of the hierarchy.

GetFileSystemEntries(String)

Returns an array that contains full paths to file system entries that are located in the directory identified by the path.

GetFileSystemEntries(String, String)

Returns an array that contains full paths to file system entries that are located in the directory identified by the path and their name matches the given searchPattern.

GetFileSystemEntries(String, String, SearchOption)

Returns an array that contains full paths to file system entries that are located in the directory identified by the path and their name matches the given searchPattern. When the searchPattern has value AllDirectories then this method returns all file system entries recursively; otherwise returns only file system entries on the first level of the hierarchy.

GetLastAccessTime(String)

Method returns the last access date and time of the directory.

GetLastAccessTimeUtc(String)

Method returns the last access date and time of the directory. The time is expressed in the UTC format.

GetLastWriteTime(String)

Method returns the last write date and time of the directory.

GetLastWriteTimeUtc(String)

Method returns the last write date and time of the directory. The time is expressed in the UTC format.

GetLogicalDrives()

Method returns an array that contains root paths for all virtual file system VDriveInfo objects.

GetParent(String)

Method returns an instance of the VDirectoryInfo class that represents the parent of the directory identified by the path.

Move(String, String)

Method moves a directory (or a file) identified by the sourceDirName to the location denoted by the destDirName.

SetCreationTime(String, DateTime)

Method sets the creation date and time of the directory.

SetCreationTimeUtc(String, DateTime)

Method sets the creation date and time of the directory.

SetLastAccessTime(String, DateTime)

Method sets the last access date and time of the directory.

SetLastAccessTimeUtc(String, DateTime)

Method sets the last access date and time of the directory.

SetLastWriteTime(String, DateTime)

Method sets the last write date and time of the directory.

SetLastWriteTimeUtc(String, DateTime)

Method sets the last write date and time of the directory.

See Also

VDirectoryInfo
VFileInfo
VFile
MemoryFileSystemProvider
LocalFileSystemProvider
MountCapableFileSystemProvider
ReadWriteFileSystemProvider
ReadOnlyFileSystemProvider
In This Article
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies