VFile Class
Namespace: Rebex.IO
Assembly: Rebex.FileSystem.dll (version 7.0.9119)
This class contains static methods that work with virtual file system files. This class provides methods that are functionally similar to the standard .NET File methods.
Syntax
public static class VFile
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 'file.dat' file in the root directory.
using (var myFile = VFile.Create(Path.Combine(memoryProviderRootPath, "file.dat")))
{
//Write data to the file
myFile.Write(myData, 0, myData.Length);
}
Methods
Name | Description |
---|---|
AppendAllLines(String, IEnumerable<String>) | Method appends |
AppendAllLines(String, IEnumerable<String>, Encoding) | Method appends |
AppendAllLinesAsync(String, IEnumerable<String>, Encoding, CancellationToken) | Method appends |
AppendAllLinesAsync(String, IEnumerable<String>, CancellationToken) | Method appends |
AppendAllText(String, String) | Method appends |
AppendAllText(String, String, Encoding) | Method appends |
AppendAllTextAsync(String, String, Encoding, CancellationToken) | Method appends |
AppendAllTextAsync(String, String, CancellationToken) | Method appends |
AppendText(String) | Method returns an instance of the StreamWriter
that appends data to the file identified by the |
Copy(String, String) | Method copies a file identified by the |
Copy(String, String, Boolean) | Method copies a file identified by the |
Create(String) | Method returns read/write instance of the VFileStream
for a file identified by the |
Create(String, Int32) | Method returns read/write instance of the VFileStream
for a file identified by the |
Create(String, Int32, FileOptions) | Method returns read/write instance of the VFileStream
for a file identified by the |
CreateText(String) | Method returns StreamWriter
for a file identified by the |
Delete(String) | Deletes a file identified by the |
Exists(String) | Method returns true when a file exists on the given |
GetAttributes(String) | Method returns FileAttributes for a file identified by the |
GetCreationTime(String) | Method returns the creation date and time of a file identified by the |
GetCreationTimeUtc(String) | Method returns the creation date and time of a file identified by the |
GetLastAccessTime(String) | Method returns the last access date and time of a file identified by the |
GetLastAccessTimeUtc(String) | Method returns the last access date and time of a file identified by the |
GetLastWriteTime(String) | Method returns the last write date and time of a file identified by the |
GetLastWriteTimeUtc(String) | Method returns the last write date and time of a file identified by the |
Move(String, String) | Method moves a file identified by the |
Open(String, FileMode) | Method returns an instance of the VFileStream
for a file identified by the |
Open(String, FileMode, FileAccess) | Method returns an instance of the VFileStream
for a file identified by the |
Open(String, FileMode, FileAccess, FileShare) | Method returns an instance of the VFileStream
for a file identified by the |
OpenRead(String) | Method returns an instance of the read-only VFileStream
for a file identified by the |
OpenText(String) | Method returns an instance of the StreamReader
for a file identified by the |
OpenWrite(String) | Method returns an instance of the write-only VFileStream
for a file identified by the |
ReadAllBytes(String) | Method returns a byte array that contains the binary content of a file identified by the |
ReadAllBytesAsync(String, CancellationToken) | Method returns a byte array that contains the binary content of a file identified by the |
ReadAllLines(String) | Method returns a string array that contains all lines from a text file identified by the |
ReadAllLines(String, Encoding) | Method returns a string array that contains all lines from a text file identified by the |
ReadAllLinesAsync(String, Encoding, CancellationToken) | Method returns a string array that contains all lines from a text file identified by the |
ReadAllLinesAsync(String, CancellationToken) | Method returns a string array that contains all lines from a text file identified by the |
ReadAllText(String) | Method returns a String that contains text content of a file identified by the |
ReadAllText(String, Encoding) | Method returns a String that contains text content of a file identified by the |
ReadAllTextAsync(String, Encoding, CancellationToken) | Method returns a String that contains text content of a file identified by the |
ReadAllTextAsync(String, CancellationToken) | Method returns a String that contains text content of a file identified by the |
ReadLines(String) | Method returns an enumerable that iterates through the lines from a text file identified by the |
ReadLines(String, Encoding) | Method returns an enumerable that iterates through the lines from a text file identified by the |
Replace(String, String, String) | Method copies content of the |
Replace(String, String, String, Boolean) | Method copies content of the |
SetAttributes(String, FileAttributes) | Method sets |
SetCreationTime(String, DateTime) | Method sets the creation date and time of a file identified by the |
SetCreationTimeUtc(String, DateTime) | Method sets the creation date and time of a file identified by the |
SetLastAccessTime(String, DateTime) | Method sets the last access date and time of a file identified by the |
SetLastAccessTimeUtc(String, DateTime) | Method sets the last access date and time of a file identified by the |
SetLastWriteTime(String, DateTime) | Method sets the last write date and time of a file identified by the |
SetLastWriteTimeUtc(String, DateTime) | Method sets the last write date and time of a file identified by the |
WriteAllBytes(String, Byte[]) | Method writes the |
WriteAllBytesAsync(String, Byte[], CancellationToken) | Method writes the |
WriteAllLines(String, IEnumerable<String>) | Method writes the |
WriteAllLines(String, IEnumerable<String>, Encoding) | Method writes the |
WriteAllLines(String, String[]) | Method writes the |
WriteAllLines(String, String[], Encoding) | Method writes the |
WriteAllLinesAsync(String, IEnumerable<String>, Encoding, CancellationToken) | Method writes the |
WriteAllLinesAsync(String, IEnumerable<String>, CancellationToken) | Method writes the |
WriteAllText(String, String) | Method writes the |
WriteAllText(String, String, Encoding) | Method writes the |
WriteAllTextAsync(String, String, Encoding, CancellationToken) | Method writes |
WriteAllTextAsync(String, String, CancellationToken) | Method writes |