![]() |
BadScript 2
|
Public Member Functions | |
| BadLayeredFileSystemStackInfo | GetInfo () |
| BadLayeredFileSystem (params BadLayeredFileSystemLayer[] layers) | |
| void | Optimize () |
| bool | Restore (string path) |
| string | GetStartupDirectory () |
| The Startup Directory of the Application. | |
| bool | Exists (string path) |
| Returns true if the given path is a file or directory. | |
| bool | IsFile (string path) |
| Returns true if the given path is a file. | |
| bool | IsDirectory (string path) |
| Returns true if the given path is a directory. | |
| IEnumerable< string > | GetFiles (string path, string extension, bool recursive) |
| Returns all files in the given directory that match the specified extension. | |
| IEnumerable< string > | GetDirectories (string path, bool recursive) |
| Returns all directories in the given directory. | |
| void | CreateDirectory (string path, bool recursive=false) |
| Creates a new directory. | |
| void | DeleteDirectory (string path, bool recursive) |
| Deletes a directory. | |
| void | DeleteFile (string path) |
| Deletes a file. | |
| string | GetFullPath (string path) |
| Returns the full path of the given path. | |
| Stream | OpenRead (string path) |
| Opens a file for reading. | |
| Stream | OpenWrite (string path, BadWriteMode mode) |
| Opens a file for writing. | |
| string | GetCurrentDirectory () |
| Returns the Current Directory. | |
| void | SetCurrentDirectory (string path) |
| Sets the current Directory. | |
| void | Copy (string src, string dst, bool overwrite=true) |
| Copies a file or directory to a new location. | |
| void | Move (string src, string dst, bool overwrite=true) |
| Moves a file or directory to a new location. | |
| BadVirtualFileSystem | GetWritable () |
Private Member Functions | |
| bool | ContentEquals (Stream s1, Stream s2) |
| bool | IsSubfolderOf (string root, string sub) |
| void | CopyDirectoryToDirectory (string src, string dst) |
| void | CopyFileToFile (string src, string dst) |
Private Attributes | |
| readonly BadLayeredFileSystemLayer[] | m_Layers |
Definition at line 11 of file BadLayeredFileSystem.cs.
| BadScript2.Container.BadLayeredFileSystem.BadLayeredFileSystem | ( | params BadLayeredFileSystemLayer[] | layers | ) |
Definition at line 41 of file BadLayeredFileSystem.cs.
|
private |
Definition at line 46 of file BadLayeredFileSystem.cs.
| void BadScript2.Container.BadLayeredFileSystem.Copy | ( | string | src, |
| string | dst, | ||
| bool | overwrite = true |
||
| ) |
Copies a file or directory to a new location.
| src | Source path |
| dst | Destination path |
| overwrite | Should file entries be overwritten? |
Implements BadScript2.IO.IFileSystem.
Definition at line 195 of file BadLayeredFileSystem.cs.
|
private |
Definition at line 237 of file BadLayeredFileSystem.cs.
|
private |
Definition at line 244 of file BadLayeredFileSystem.cs.
| void BadScript2.Container.BadLayeredFileSystem.CreateDirectory | ( | string | path, |
| bool | recursive = false |
||
| ) |
Creates a new directory.
| path | The path to the directory |
| recursive | If true, all parent directories will be created if they do not exist |
Implements BadScript2.IO.IFileSystem.
Definition at line 138 of file BadLayeredFileSystem.cs.
| void BadScript2.Container.BadLayeredFileSystem.DeleteDirectory | ( | string | path, |
| bool | recursive | ||
| ) |
Deletes a directory.
| path | The path to the directory |
| recursive | If true, all subdirectories will be deleted |
Implements BadScript2.IO.IFileSystem.
Definition at line 143 of file BadLayeredFileSystem.cs.
| void BadScript2.Container.BadLayeredFileSystem.DeleteFile | ( | string | path | ) |
Deletes a file.
| path | The path to the directory |
Implements BadScript2.IO.IFileSystem.
Definition at line 149 of file BadLayeredFileSystem.cs.
| bool BadScript2.Container.BadLayeredFileSystem.Exists | ( | string | path | ) |
Returns true if the given path is a file or directory.
| path | The path to check |
Implements BadScript2.IO.IFileSystem.
Definition at line 105 of file BadLayeredFileSystem.cs.
| string BadScript2.Container.BadLayeredFileSystem.GetCurrentDirectory | ( | ) |
Returns the Current Directory.
Implements BadScript2.IO.IFileSystem.
Definition at line 185 of file BadLayeredFileSystem.cs.
| IEnumerable< string > BadScript2.Container.BadLayeredFileSystem.GetDirectories | ( | string | path, |
| bool | recursive | ||
| ) |
Returns all directories in the given directory.
| path | The path to the directory |
| recursive | True if the search should be recursive |
Implements BadScript2.IO.IFileSystem.
Definition at line 129 of file BadLayeredFileSystem.cs.
| IEnumerable< string > BadScript2.Container.BadLayeredFileSystem.GetFiles | ( | string | path, |
| string | extension, | ||
| bool | recursive | ||
| ) |
Returns all files in the given directory that match the specified extension.
| path | The path to the directory |
| extension | The extension to match |
| recursive | True if the search should be recursive |
Implements BadScript2.IO.IFileSystem.
Definition at line 120 of file BadLayeredFileSystem.cs.
| string BadScript2.Container.BadLayeredFileSystem.GetFullPath | ( | string | path | ) |
Returns the full path of the given path.
| path | Path |
Implements BadScript2.IO.IFileSystem.
Definition at line 155 of file BadLayeredFileSystem.cs.
| BadLayeredFileSystemStackInfo BadScript2.Container.BadLayeredFileSystem.GetInfo | ( | ) |
Definition at line 15 of file BadLayeredFileSystem.cs.
| string BadScript2.Container.BadLayeredFileSystem.GetStartupDirectory | ( | ) |
The Startup Directory of the Application.
Implements BadScript2.IO.IFileSystem.
Definition at line 100 of file BadLayeredFileSystem.cs.
| BadVirtualFileSystem BadScript2.Container.BadLayeredFileSystem.GetWritable | ( | ) |
Definition at line 227 of file BadLayeredFileSystem.cs.
| bool BadScript2.Container.BadLayeredFileSystem.IsDirectory | ( | string | path | ) |
Returns true if the given path is a directory.
| path | The path to check |
Implements BadScript2.IO.IFileSystem.
Definition at line 115 of file BadLayeredFileSystem.cs.
| bool BadScript2.Container.BadLayeredFileSystem.IsFile | ( | string | path | ) |
Returns true if the given path is a file.
| path | The path to check |
Implements BadScript2.IO.IFileSystem.
Definition at line 110 of file BadLayeredFileSystem.cs.
|
private |
Definition at line 232 of file BadLayeredFileSystem.cs.
| void BadScript2.Container.BadLayeredFileSystem.Move | ( | string | src, |
| string | dst, | ||
| bool | overwrite = true |
||
| ) |
Moves a file or directory to a new location.
| src | Source path |
| dst | Destination path |
| overwrite | Should file entries be overwritten? |
Implements BadScript2.IO.IFileSystem.
Definition at line 217 of file BadLayeredFileSystem.cs.
| Stream BadScript2.Container.BadLayeredFileSystem.OpenRead | ( | string | path | ) |
Opens a file for reading.
| path | The path to the file |
Implements BadScript2.IO.IFileSystem.
Definition at line 160 of file BadLayeredFileSystem.cs.
| Stream BadScript2.Container.BadLayeredFileSystem.OpenWrite | ( | string | path, |
| BadWriteMode | mode | ||
| ) |
Opens a file for writing.
| path | The path to the file |
| mode | The Write Mode |
Implements BadScript2.IO.IFileSystem.
Definition at line 166 of file BadLayeredFileSystem.cs.
| void BadScript2.Container.BadLayeredFileSystem.Optimize | ( | ) |
Definition at line 58 of file BadLayeredFileSystem.cs.
| bool BadScript2.Container.BadLayeredFileSystem.Restore | ( | string | path | ) |
Definition at line 83 of file BadLayeredFileSystem.cs.
| void BadScript2.Container.BadLayeredFileSystem.SetCurrentDirectory | ( | string | path | ) |
Sets the current Directory.
| path | the new current directory |
Implements BadScript2.IO.IFileSystem.
Definition at line 190 of file BadLayeredFileSystem.cs.
|
private |
Definition at line 13 of file BadLayeredFileSystem.cs.