|
PeanutButter
|
Describes the contract for an auto-deleting temporary folder. More...
Public Member Functions | |
| string | ResolvePath (string p1, params string[] more) |
| Resolves a relative path (or path parts) within the auto temp folder. | |
| IEnumerable< string > | ResolvePaths (IEnumerable< string > relativePaths) |
| Resolves all provided relative paths within the temp folder. | |
| string | CreateFolder (string dirname) |
| Creates a directory within the auto temp folder. | |
| string | WriteFile (string filename, string data) |
| Writes a file within the auto temp folder. | |
| string | WriteFile (string filename, byte[] data) |
| Writes a file within the auto temp folder. | |
| string | WriteFile (string filename, Stream data) |
| Writes a file within the auto temp folder. | |
| string | ReadTextFile (string filename) |
| Reads a text file by relative path within the auto temp folder. | |
| byte[] | ReadFile (string filename) |
| Reads a binary file by relative path within the auto temp folder. | |
| FileStream | OpenFile (string filename) |
| Opens a file (read-only) by relative path within the auto temp folder. | |
| FileStream | OpenFile (string filename, FileAccess access) |
| Opens a file by relative path within the auto temp folder with the desired access. | |
| FileStream | OpenFile (string filename, FileAccess access, FileShare share) |
| Opens a file by relative path within the auto temp folder with the desired access and share. | |
| FileStream | OpenFile (string filename, FileAccess access, FileShare share, int bufferSize) |
| Opens a file by relative path within the auto temp folder with the desired access, share and buffer size. | |
| FileStream | OpenFile (string filename, FileAccess access, FileShare share, int bufferSize, FileOptions options) |
| Opens a file by relative path within the auto temp folder with the desired access, share, buffer size and options. | |
| bool | FileExists (string relativePath) |
| Returns true if the relative path is found to be a file. | |
| bool | FolderExists (string relativePath) |
| Returns true if the relative path is found to be a folder. | |
| bool | Exists (string relativePath) |
| Returns true if the relative path is a file or folder. | |
| bool | Contains (string fullPath) |
| Returns true if the provided path is contained within the temp folder. | |
Properties | |
| string | Path [get] |
| The local path at which this temp folder exists. | |
| int | RetryOperations [get, set] |
| How many times to retry operations if they fail. | |
Describes the contract for an auto-deleting temporary folder.
| bool PeanutButter.Utils.IAutoTempFolder.Contains | ( | string | fullPath | ) |
Returns true if the provided path is contained within the temp folder.
| fullPath |
Implemented in PeanutButter.Utils.AutoTempFolder.
| string PeanutButter.Utils.IAutoTempFolder.CreateFolder | ( | string | dirname | ) |
Creates a directory within the auto temp folder.
| dirname |
Implemented in PeanutButter.Utils.AutoTempFolder.
| bool PeanutButter.Utils.IAutoTempFolder.Exists | ( | string | relativePath | ) |
Returns true if the relative path is a file or folder.
| relativePath |
Implemented in PeanutButter.Utils.AutoTempFolder.
| bool PeanutButter.Utils.IAutoTempFolder.FileExists | ( | string | relativePath | ) |
Returns true if the relative path is found to be a file.
| relativePath |
Implemented in PeanutButter.Utils.AutoTempFolder.
| bool PeanutButter.Utils.IAutoTempFolder.FolderExists | ( | string | relativePath | ) |
Returns true if the relative path is found to be a folder.
| relativePath |
Implemented in PeanutButter.Utils.AutoTempFolder.
| FileStream PeanutButter.Utils.IAutoTempFolder.OpenFile | ( | string | filename | ) |
Opens a file (read-only) by relative path within the auto temp folder.
| filename |
Implemented in PeanutButter.Utils.AutoTempFolder.
| FileStream PeanutButter.Utils.IAutoTempFolder.OpenFile | ( | string | filename, |
| FileAccess | access ) |
Opens a file by relative path within the auto temp folder with the desired access.
| filename | |
| access |
Implemented in PeanutButter.Utils.AutoTempFolder.
| FileStream PeanutButter.Utils.IAutoTempFolder.OpenFile | ( | string | filename, |
| FileAccess | access, | ||
| FileShare | share ) |
Opens a file by relative path within the auto temp folder with the desired access and share.
| filename | |
| access | |
| share |
Implemented in PeanutButter.Utils.AutoTempFolder.
| FileStream PeanutButter.Utils.IAutoTempFolder.OpenFile | ( | string | filename, |
| FileAccess | access, | ||
| FileShare | share, | ||
| int | bufferSize ) |
Opens a file by relative path within the auto temp folder with the desired access, share and buffer size.
| filename | |
| access | |
| share | |
| bufferSize |
Implemented in PeanutButter.Utils.AutoTempFolder.
| FileStream PeanutButter.Utils.IAutoTempFolder.OpenFile | ( | string | filename, |
| FileAccess | access, | ||
| FileShare | share, | ||
| int | bufferSize, | ||
| FileOptions | options ) |
Opens a file by relative path within the auto temp folder with the desired access, share, buffer size and options.
| filename | |
| access | |
| share | |
| bufferSize | |
| options |
Implemented in PeanutButter.Utils.AutoTempFolder.
| byte[] PeanutButter.Utils.IAutoTempFolder.ReadFile | ( | string | filename | ) |
Reads a binary file by relative path within the auto temp folder.
| filename |
Implemented in PeanutButter.Utils.AutoTempFolder.
| string PeanutButter.Utils.IAutoTempFolder.ReadTextFile | ( | string | filename | ) |
Reads a text file by relative path within the auto temp folder.
| filename |
Implemented in PeanutButter.Utils.AutoTempFolder.
| string PeanutButter.Utils.IAutoTempFolder.ResolvePath | ( | string | p1, |
| params string[] | more ) |
Resolves a relative path (or path parts) within the auto temp folder.
| p1 | |
| more |
Implemented in PeanutButter.Utils.AutoTempFolder.
| IEnumerable< string > PeanutButter.Utils.IAutoTempFolder.ResolvePaths | ( | IEnumerable< string > | relativePaths | ) |
Resolves all provided relative paths within the temp folder.
| relativePaths |
Implemented in PeanutButter.Utils.AutoTempFolder.
| string PeanutButter.Utils.IAutoTempFolder.WriteFile | ( | string | filename, |
| byte[] | data ) |
Writes a file within the auto temp folder.
| filename | relative path to the file |
| data | binary data to write |
Implemented in PeanutButter.Utils.AutoTempFolder.
| string PeanutButter.Utils.IAutoTempFolder.WriteFile | ( | string | filename, |
| Stream | data ) |
Writes a file within the auto temp folder.
| filename | relative path to the file |
| data | stream data to write |
Implemented in PeanutButter.Utils.AutoTempFolder.
| string PeanutButter.Utils.IAutoTempFolder.WriteFile | ( | string | filename, |
| string | data ) |
Writes a file within the auto temp folder.
| filename | relative path to the file |
| data | string data to write |
Implemented in PeanutButter.Utils.AutoTempFolder.
|
get |
The local path at which this temp folder exists.
Implemented in PeanutButter.Utils.AutoTempFolder.
|
getset |
How many times to retry operations if they fail.
Implemented in PeanutButter.Utils.AutoTempFolder.