|
Joutsen v0.5.0+12-g5dd5f7e
|
A class representing a file in the file system. More...
Public Member Functions | |
| LocalFile (string path) | |
| Creates a new File instance for a path. More... | |
| LocalFile (LocalFilesystemPath path) | |
| Creates a new File instance for a path represented by a string. More... | |
| 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... | |
| File | MoveTo (File dstFile) |
| 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... | |
| override bool | Equals (object obj) |
| Compares this instance to another one for equality. More... | |
| override int | GetHashCode () |
| Calculates the hash code for this instance. More... | |
| override string | ToString () |
| Creates a string representation of this file instance. More... | |
| 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] |
| The name of the file. More... | |
| String | Extension [get] |
| The extension of the file. More... | |
| LocalFilesystemPath | Path [get] |
| The path of the file. More... | |
| LocalFolder | Folder [get] |
| The path of the file. 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... | |
Properties inherited from Joutsen.IO.File | |
| 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... | |
A class representing a file in the file system.
| Joutsen.IO.LocalFile.LocalFile | ( | string | path | ) |
Creates a new File instance for a path.
| path | the path to the file. Can be absolute or relative. |
| System.ArgumentNullException | if path is null |
| System.ArgumentException | if path is empty or leads to a folder |
| Joutsen.IO.LocalFile.LocalFile | ( | LocalFilesystemPath | path | ) |
Creates a new File instance for a path represented by a string.
| path | the path to the file. Can be absolute or relative. |
| System.ArgumentNullException | if @path is null |
| System.ArgumentException | if path leads to a folder |
| File Joutsen.IO.LocalFile.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 |
Implements Joutsen.IO.File.
| File Joutsen.IO.LocalFile.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 |
Implements Joutsen.IO.File.
| void Joutsen.IO.LocalFile.Create | ( | ) |
Creates the file without content.
Implements Joutsen.IO.File.
| void Joutsen.IO.LocalFile.Create | ( | SystemIO.Stream | contents | ) |
Creates the file with content.
| content | the content that should be written to the new file |
Implements Joutsen.IO.File.
| SystemIO.Stream Joutsen.IO.LocalFile.CreateAndOpen | ( | ) |
Creates the file on the filesystem and opens it for writing.
Implements Joutsen.IO.File.
| void Joutsen.IO.LocalFile.Delete | ( | ) |
Deletes the file on from the filesystem.
Implements Joutsen.IO.File.
| override bool Joutsen.IO.LocalFile.Equals | ( | object | obj | ) |
Compares this instance to another one for equality.
| obj | the instance to check for equality |
| override int Joutsen.IO.LocalFile.GetHashCode | ( | ) |
Calculates the hash code for this instance.
| File Joutsen.IO.LocalFile.MoveTo | ( | FilesystemPath | dstPath | ) |
Moves the file to a different location.
| dstPath | the path to move the file to |
| System.ArgumentNullException | if dstPath is null |
Implements Joutsen.IO.File.
| File Joutsen.IO.LocalFile.MoveTo | ( | string | dstPath | ) |
Moves the file to a different location.
| dstPath | the path to move the file to |
Implements Joutsen.IO.File.
| SystemIO.Stream Joutsen.IO.LocalFile.Open | ( | SystemIO.FileMode | mode | ) |
Opens the file for reading or writing.
| mode | determines if the file is opened for reading or writing |
Implements Joutsen.IO.File.
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. Implements Joutsen.IO.File.
| File Joutsen.IO.LocalFile.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 |
Implements Joutsen.IO.File.
| File Joutsen.IO.LocalFile.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 |
Implements Joutsen.IO.File.
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. Implements Joutsen.IO.File.
| File Joutsen.IO.LocalFile.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. Implements Joutsen.IO.File.
| File Joutsen.IO.LocalFile.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. Implements Joutsen.IO.File.
| override string Joutsen.IO.LocalFile.ToString | ( | ) |
Creates a string representation of this file instance.
|
get |
The time the file was created.
Implements Joutsen.IO.File.
|
get |
Checks if the file exists in the filesystem.
Implements Joutsen.IO.File.
|
get |
The extension of the file.
Implements Joutsen.IO.File.
|
get |
The path of the file.
Implements Joutsen.IO.File.
|
get |
Checks if the file is writable in the filesystem.
Implements Joutsen.IO.File.
|
get |
The time the file was last changed.
Implements Joutsen.IO.File.
|
get |
The name of the file.
Implements Joutsen.IO.File.
|
get |
The path of the file.
Implements Joutsen.IO.File.