|
Joutsen v0.5.0+12-g5dd5f7e
|
A class representing a temporarily available file in the filesystem. More...
Public Member Functions | |
| TemporaryFile (bool createFile=true, bool removeCreatedFiles=false) | |
| Creates a new file located in the temporary folder of the local filesystem. More... | |
| TemporaryFile (String path, bool createFile=true, bool removeCreatedFiles=false) | |
| Creates a new file in the location and with the name specified by. More... | |
| TemporaryFile (FilesystemPath path, bool createFile=true, bool removeCreatedFiles=false) | |
| Creates a new file in the location and with the name specified by. More... | |
| TemporaryFile (File file, bool createFile=true, bool removeCreatedFiles=false) | |
| Creates a new file in the location and with the name specified by. More... | |
| TemporaryFile (File file, bool removeCreatedFiles) | |
| 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... | |
| void | Dispose () |
| Removes the temporary file if possible. 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... | |
Protected Member Functions | |
| TemporaryFile | CreateTemporaryFile (File newFile) |
| virtual void | Dispose (bool disposing) |
Protected Attributes | |
| File | file |
| List< TemporaryFile > | createdFiles |
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... | |
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 temporarily available file in the filesystem.
| Joutsen.IO.TemporaryFile.TemporaryFile | ( | bool | createFile = true, |
| bool | removeCreatedFiles = false |
||
| ) |
Creates a new file located in the temporary folder of the local filesystem.
| create | determines if the file should be created on the filesystem together with the new instance |
| removeCreatedFiles | determines if all files created by this instance should also be removed when this file is removed |
| Joutsen.IO.TemporaryFile.TemporaryFile | ( | String | path, |
| bool | createFile = true, |
||
| bool | removeCreatedFiles = false |
||
| ) |
Creates a new file in the location and with the name specified by.
| path | in the local filesystem. |
| path | the full path to the file including its name |
| create | determines if the file should be created on the filesystem together with the new instance |
| removeCreatedFiles | determines if all files created by this instance should also be removed when this file is removed |
| ArgumentException | if the specified file already exists |
| Joutsen.IO.TemporaryFile.TemporaryFile | ( | FilesystemPath | path, |
| bool | createFile = true, |
||
| bool | removeCreatedFiles = false |
||
| ) |
Creates a new file in the location and with the name specified by.
| path | in the local filesystem. |
| path | the full path to the file including its name |
| create | determines if the file should be created on the filesystem together with the new instance |
| removeCreatedFiles | determines if all files created by this instance should also be removed when this file is removed |
| ArgumentException | if the specified file already exists |
| Joutsen.IO.TemporaryFile.TemporaryFile | ( | File | file, |
| bool | createFile = true, |
||
| bool | removeCreatedFiles = false |
||
| ) |
Creates a new file in the location and with the name specified by.
| path. | |
| path | the full path to the file including its name |
| create | determines if the file should be created on the filesystem together with the new instance |
| removeCreatedFiles | determines if all files created by this instance should also be removed when this file is removed |
| ArgumentException | if the specified file already exists |
| Joutsen.IO.TemporaryFile.TemporaryFile | ( | File | file, |
| bool | removeCreatedFiles | ||
| ) |
| File Joutsen.IO.TemporaryFile.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.TemporaryFile.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.TemporaryFile.Create | ( | ) |
Creates the file without content.
Implements Joutsen.IO.File.
| void Joutsen.IO.TemporaryFile.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.TemporaryFile.CreateAndOpen | ( | ) |
Creates the file on the filesystem and opens it for writing.
Implements Joutsen.IO.File.
|
protected |
| void Joutsen.IO.TemporaryFile.Delete | ( | ) |
Deletes the file on from the filesystem.
Implements Joutsen.IO.File.
| void Joutsen.IO.TemporaryFile.Dispose | ( | ) |
Removes the temporary file if possible.
|
protectedvirtual |
| File Joutsen.IO.TemporaryFile.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.TemporaryFile.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.TemporaryFile.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.TemporaryFile.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.TemporaryFile.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.TemporaryFile.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.TemporaryFile.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.
|
protected |
|
protected |
|
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 folder where the file is located.
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 |
Implements Joutsen.IO.File.
|
get |
The path of the file.
Implements Joutsen.IO.File.