|
Joutsen v0.5.0+12-g5dd5f7e
|
An interface representing a file in the filesystem. More...
Public Member Functions | |
| void | Create () |
| Creates the file without content. More... | |
| void | Create (SystemIO.Stream contents) |
Creates the file with content. More... | |
| SystemIO.Stream | CreateAndOpen () |
| Creates the file on the filesystem and opens it for writing. More... | |
| SystemIO.Stream | Open (SystemIO.FileMode mode) |
| Opens the file for reading or writing. More... | |
| File | CopyTo (string dstPath, bool overwrite=false) |
| Copies the file to a different path. More... | |
| File | CopyTo (FilesystemPath dstPath, bool overwrite=false) |
| Copies the file to a different path. More... | |
| File | MoveTo (string dstPath) |
| Moves the file to a different location. More... | |
| File | MoveTo (FilesystemPath dstPath) |
| Moves the file to a different location. More... | |
| void | Delete () |
| Deletes the file on from the filesystem. More... | |
| File | Replace (string dstPath, string backupPath) |
Replaces the file at dstPath with this file creating a backup in backupPath. More... | |
| File | Replace (FilesystemPath dstPath, FilesystemPath backupPath) |
Replaces the file at dstPath with this file creating a backup in backupPath. More... | |
| File | Replace (File dstFile, File backup) |
Replaces the file at dstFile with this file creating a backup in backup. More... | |
| File | ReplaceWith (string srcPath, string backupPath) |
| Replace this file's content with the content of the file at @psrcPath. More... | |
| File | ReplaceWith (FilesystemPath srcPath, FilesystemPath backupPath) |
| Replace this file's content with the content of the file at @psrcPath. More... | |
| File | ReplaceWith (File srcFile, File backup) |
Replace this file's content with the content of srcFile. More... | |
Properties | |
| String | Name [get] |
| String | Extension [get] |
| The extension of the file. More... | |
| FilesystemPath | Path [get] |
| The path of the file. More... | |
| Folder | Folder [get] |
| The folder where the file is located. More... | |
| DateTime | LastModificationTime [get] |
| The time the file was last changed. More... | |
| DateTime | CreationTime [get] |
| The time the file was created. More... | |
| bool | Exists [get] |
| Checks if the file exists in the filesystem. More... | |
| bool | IsWritable [get] |
| Checks if the file is writable in the filesystem. More... | |
An interface representing a file in the filesystem.
| File Joutsen.IO.File.CopyTo | ( | FilesystemPath | dstPath, |
| bool | overwrite = false |
||
| ) |
Copies the file to a different path.
| dstPath | the path to copy the file to |
| overwrite | determines if an existing file at dstPath should be overwritten |
| System.ArgumentNullException | if dstPath is null |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| File Joutsen.IO.File.CopyTo | ( | string | dstPath, |
| bool | overwrite = false |
||
| ) |
Copies the file to a different path.
| dstPath | the path to copy the file to |
| overwrite | determines if an existing file at dstPath should be overwritten |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| void Joutsen.IO.File.Create | ( | ) |
Creates the file without content.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| void Joutsen.IO.File.Create | ( | SystemIO.Stream | contents | ) |
Creates the file with content.
| content | the content that should be written to the new file |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| SystemIO.Stream Joutsen.IO.File.CreateAndOpen | ( | ) |
Creates the file on the filesystem and opens it for writing.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| void Joutsen.IO.File.Delete | ( | ) |
Deletes the file on from the filesystem.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| File Joutsen.IO.File.MoveTo | ( | FilesystemPath | dstPath | ) |
Moves the file to a different location.
| dstPath | the path to move the file to |
| System.ArgumentNullException | if dstPath is null |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| File Joutsen.IO.File.MoveTo | ( | string | dstPath | ) |
Moves the file to a different location.
| dstPath | the path to move the file to |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| SystemIO.Stream Joutsen.IO.File.Open | ( | SystemIO.FileMode | mode | ) |
Opens the file for reading or writing.
| mode | determines if the file is opened for reading or writing |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
Replaces the file at dstFile with this file creating a backup in backup.
| dstFile | the file that should be replaced |
| backup | the file where the backup of dstFile should be stored |
| System.ArgumentNullException | if dstFile is null |
backup, no backup is created. Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| File Joutsen.IO.File.Replace | ( | FilesystemPath | dstPath, |
| FilesystemPath | backupPath | ||
| ) |
Replaces the file at dstPath with this file creating a backup in backupPath.
| dstpath | the path to the file that should be replaced |
| backupPath | the path to the location where the backup of the file at dstPath should be stored |
| System.ArgumentNullException | if dstPath is null |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| File Joutsen.IO.File.Replace | ( | string | dstPath, |
| string | backupPath | ||
| ) |
Replaces the file at dstPath with this file creating a backup in backupPath.
| dstpath | the path to the file that should be replaced |
| backupPath | the path to the location where the backup of the file at dstPath should be stored |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
Replace this file's content with the content of srcFile.
| srcFile | the file that contains the content which should replace this file |
| backup | the file where the backup of this file should be stored |
| System.ArgumentNullException | if srcFile is null |
backup, no backup is created. Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| File Joutsen.IO.File.ReplaceWith | ( | FilesystemPath | srcPath, |
| FilesystemPath | backupPath | ||
| ) |
Replace this file's content with the content of the file at @psrcPath.
| srcPath | the path to the file that contains the content which should replace this file |
| backup | the file where the backup of this file should be stored |
| System.ArgumentNullException | if srcFile is null |
backup, no backup is created. Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
| File Joutsen.IO.File.ReplaceWith | ( | string | srcPath, |
| string | backupPath | ||
| ) |
Replace this file's content with the content of the file at @psrcPath.
| srcPath | the path to the file that contains the content which should replace this file |
| backup | the file where the backup of this file should be stored |
| System.ArgumentNullException | if srcFile is null |
backup, no backup is created. Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
The time the file was created.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
Checks if the file exists in the filesystem.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
The extension of the file.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
The folder where the file is located.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
Checks if the file is writable in the filesystem.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
The time the file was last changed.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.
|
get |
The path of the file.
Implemented in Joutsen.IO.LocalFile, and Joutsen.IO.TemporaryFile.