![]() |
PgVFS.NET
A C# System.IO compatible File System on Postgres
|
A System.IO.File singleton equivalent More...
Public Member Functions | |
| void | AppendAllLines (string path, IEnumerable< string > contents) |
| Appends all lines to a file More... | |
| void | AppendAllLines (string path, IEnumerable< string > contents, Encoding encoding) |
| Appends all lines to a file with encoding More... | |
| void | AppendAllText (string path, string contents) |
| Appends text to a file More... | |
| void | AppendAllText (string path, string contents, Encoding encoding) |
| Appends text to a file with encoding More... | |
| StreamWriter | AppendText (string path) |
| Creates an stream that appends text More... | |
| void | Copy (string sourceFileName, string destFileName, bool overwrite=false) |
| Copies an existing file to a new file. Overwriting a file of the same name is allowed. More... | |
| Stream | Create (string path, int bufferSize=4096) |
| Creates or overwrites the specified file with the specified buffer size More... | |
| StreamWriter | CreateText (string path) |
| Creates a file in text mode and returns a StreamWriter More... | |
| void | Delete (string path) |
| Deletes a file More... | |
| bool | Exists (string path) |
| File exists? More... | |
| DateTime | GetCreationTime (string path) |
| Gets creation time in local zone More... | |
| DateTime | GetCreationTimeUtc (string path) |
| Gets creation time in UTC More... | |
| DateTime | GetLastWriteTime (string path) |
| Gets last write time in local zone More... | |
| DateTime | GetLastWriteTimeUtc (string path) |
| Gets last write time in UTC More... | |
| long | GetLength (string file) |
| Gets file length More... | |
| void | Move (string sourceFileName, string destFileName) |
| Moves or renames a file More... | |
| Stream | Open (string file_path, FileMode mode, FileAccess access=FileAccess.ReadWrite, FileShare share=FileShare.ReadWrite) |
| Opens a System.IO.Stream on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option. More... | |
| Stream | OpenRead (string path) |
| Creates or opens a file for writing UTF-8 encoded text More... | |
| StreamReader | OpenText (string path) |
| Opens an existing UTF-8 encoded text file for reading. More... | |
| Stream | OpenWrite (string path) |
| Opens an existing file for writing. More... | |
| byte[] | ReadAllBytes (string path) |
| Opens a binary file, reads the contents of the file into a byte array, and then closes the file More... | |
| string[] | ReadAllLines (string path, Encoding encoding=null) |
| Opens a file, reads all lines of the file with the specified encoding, and then closes the file. More... | |
| string | ReadAllText (string path, Encoding encoding=null) |
| Opens a file, reads all lines of the file with the specified encoding, and then closes the file. More... | |
| IEnumerable< string > | ReadLines (string path, Encoding encoding=null) |
| Read the lines of a file that has a specified encoding. More... | |
| void | SetLastWriteTime (string path, DateTime lastWriteTime) |
| Sets the date and time that the specified file was last written to. More... | |
| void | SetLastWriteTimeUtc (string path, DateTime lastWriteTimeUtc) |
| Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to. More... | |
| void | WriteAllBytes (string path, byte[] bytes) |
| Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten. More... | |
| void | WriteAllLines (string path, IEnumerable< string > contents) |
| Creates a new file, writes a collection of strings to the file, and then closes the file. More... | |
| void | WriteAllLines (string path, string[] contents) |
| Creates a new file, write the specified string array to the file, and then closes the file. More... | |
| void | WriteAllLines (string path, IEnumerable< string > contents, Encoding encoding) |
| Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file. More... | |
| void | WriteAllLines (string path, string[] contents, Encoding encoding) |
| Creates a new file, writes the specified string array to the file by using the specified encoding, and then closes the file. More... | |
| void | WriteAllText (string path, string contents) |
| Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten. More... | |
| void | WriteAllText (string path, string contents, Encoding encoding) |
| Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten. More... | |
A System.IO.File singleton equivalent
| void Vfs.IVfsFile.AppendAllLines | ( | string | path, |
| IEnumerable< string > | contents | ||
| ) |
Appends all lines to a file
| path | |
| contents |
| void Vfs.IVfsFile.AppendAllLines | ( | string | path, |
| IEnumerable< string > | contents, | ||
| Encoding | encoding | ||
| ) |
Appends all lines to a file with encoding
| path | |
| contents | |
| encoding |
| void Vfs.IVfsFile.AppendAllText | ( | string | path, |
| string | contents | ||
| ) |
Appends text to a file
| path | |
| contents |
| void Vfs.IVfsFile.AppendAllText | ( | string | path, |
| string | contents, | ||
| Encoding | encoding | ||
| ) |
Appends text to a file with encoding
| path | |
| contents | |
| encoding |
| StreamWriter Vfs.IVfsFile.AppendText | ( | string | path | ) |
Creates an stream that appends text
| path |
| void Vfs.IVfsFile.Copy | ( | string | sourceFileName, |
| string | destFileName, | ||
| bool | overwrite = false |
||
| ) |
Copies an existing file to a new file. Overwriting a file of the same name is allowed.
| sourceFileName | |
| destFileName | |
| overwrite |
| Stream Vfs.IVfsFile.Create | ( | string | path, |
| int | bufferSize = 4096 |
||
| ) |
Creates or overwrites the specified file with the specified buffer size
| path | |
| bufferSize |
| StreamWriter Vfs.IVfsFile.CreateText | ( | string | path | ) |
Creates a file in text mode and returns a StreamWriter
| path |
| void Vfs.IVfsFile.Delete | ( | string | path | ) |
Deletes a file
| path |
| bool Vfs.IVfsFile.Exists | ( | string | path | ) |
File exists?
| path |
| DateTime Vfs.IVfsFile.GetCreationTime | ( | string | path | ) |
Gets creation time in local zone
| path |
| DateTime Vfs.IVfsFile.GetCreationTimeUtc | ( | string | path | ) |
Gets creation time in UTC
| path |
| DateTime Vfs.IVfsFile.GetLastWriteTime | ( | string | path | ) |
Gets last write time in local zone
| path |
| DateTime Vfs.IVfsFile.GetLastWriteTimeUtc | ( | string | path | ) |
Gets last write time in UTC
| path |
| long Vfs.IVfsFile.GetLength | ( | string | file | ) |
Gets file length
| file |
| void Vfs.IVfsFile.Move | ( | string | sourceFileName, |
| string | destFileName | ||
| ) |
Moves or renames a file
| sourceFileName | |
| destFileName |
| Stream Vfs.IVfsFile.Open | ( | string | file_path, |
| FileMode | mode, | ||
| FileAccess | access = FileAccess.ReadWrite, |
||
| FileShare | share = FileShare.ReadWrite |
||
| ) |
Opens a System.IO.Stream on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.
| file_path | |
| mode | |
| access | |
| share |
| Stream Vfs.IVfsFile.OpenRead | ( | string | path | ) |
Creates or opens a file for writing UTF-8 encoded text
| path |
| StreamReader Vfs.IVfsFile.OpenText | ( | string | path | ) |
Opens an existing UTF-8 encoded text file for reading.
| path |
| Stream Vfs.IVfsFile.OpenWrite | ( | string | path | ) |
Opens an existing file for writing.
| path |
| byte [] Vfs.IVfsFile.ReadAllBytes | ( | string | path | ) |
Opens a binary file, reads the contents of the file into a byte array, and then closes the file
| path |
| string [] Vfs.IVfsFile.ReadAllLines | ( | string | path, |
| Encoding | encoding = null |
||
| ) |
Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
| path | |
| encoding |
| string Vfs.IVfsFile.ReadAllText | ( | string | path, |
| Encoding | encoding = null |
||
| ) |
Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
| path | |
| encoding |
| IEnumerable<string> Vfs.IVfsFile.ReadLines | ( | string | path, |
| Encoding | encoding = null |
||
| ) |
Read the lines of a file that has a specified encoding.
| path | |
| encoding |
| void Vfs.IVfsFile.SetLastWriteTime | ( | string | path, |
| DateTime | lastWriteTime | ||
| ) |
Sets the date and time that the specified file was last written to.
| path | |
| lastWriteTime |
| void Vfs.IVfsFile.SetLastWriteTimeUtc | ( | string | path, |
| DateTime | lastWriteTimeUtc | ||
| ) |
Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.
| path | |
| lastWriteTimeUtc |
| void Vfs.IVfsFile.WriteAllBytes | ( | string | path, |
| byte[] | bytes | ||
| ) |
Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.
| path | |
| bytes |
| void Vfs.IVfsFile.WriteAllLines | ( | string | path, |
| IEnumerable< string > | contents | ||
| ) |
Creates a new file, writes a collection of strings to the file, and then closes the file.
| path | |
| contents |
| void Vfs.IVfsFile.WriteAllLines | ( | string | path, |
| string[] | contents | ||
| ) |
Creates a new file, write the specified string array to the file, and then closes the file.
| path | |
| contents |
| void Vfs.IVfsFile.WriteAllLines | ( | string | path, |
| IEnumerable< string > | contents, | ||
| Encoding | encoding | ||
| ) |
Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
| path | |
| contents | |
| encoding |
| void Vfs.IVfsFile.WriteAllLines | ( | string | path, |
| string[] | contents, | ||
| Encoding | encoding | ||
| ) |
Creates a new file, writes the specified string array to the file by using the specified encoding, and then closes the file.
| path | |
| contents | |
| encoding |
| void Vfs.IVfsFile.WriteAllText | ( | string | path, |
| string | contents | ||
| ) |
Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.
| path | |
| contents |
| void Vfs.IVfsFile.WriteAllText | ( | string | path, |
| string | contents, | ||
| Encoding | encoding | ||
| ) |
Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.
| path | |
| contents | |
| encoding |