Method | Description | |
---|---|---|
AddExistingFile ( string filename ) : void |
Adds the given filename to the collection of files that should be considered to exist.
|
|
AddFile ( string filename, string contents, |
Adds the given filename to the collection of files that should be considered to exist and set its contents so it can be read.
|
|
CreateFileContents ( bool fIncludeBOM, string sBookId ) : string |
Create the simulated file contents, suitable for calling MakeFile or AddFile.
|
|
LockFile ( string filename ) : void |
Simulates getting an exclusive (write) file lock on the file having the given filename.
|
|
MakeFile ( string contents ) : string |
Adds a new "temp" file (with fully-qualified path and name) to the collection of files and sets its contents so it can be read. Encoding will be UTF8.
|
|
MakeFile ( string contents, |
Adds a new "temp" file (with fully-qualified path and name) to the collection of files and sets its contents so it can be read.
|
|
MakeSfFile ( |
Create a mocked Standard Format file with \id line and file contents as specified.
|
|
MakeSfFile ( bool fIncludeBOM, string sBookId ) : string |
Create a mocked Standard Format file with \id line and file contents as specified. Encoding will be UTF8.
|
|
MakeSfFile ( string sBookId ) : string |
Create a mocked Standard Format file with \id line and file contents as specified. No BOM. Encoding will be UTF8.
|
Method | Description | |
---|---|---|
GetFileInfo ( string filename ) : MockFile |
Gets the file info for the given filename (Using a case-insensitive lookup).
|
|
GetFileInfo ( string filename, FileLockType lockNeeded ) : MockFile |
Gets the file info for the given filename (Using a case-insensitive lookup).
|
|
GetKey ( string filename ) : string |
Gets the key for the file info for the given filename (Using a case-insensitive lookup).
|
|
IFileOS ( string filename ) : Stream |
Gets the writer.
|
|
IFileOS ( string filename, FileMode mode ) : Stream | ||
IFileOS ( string filename, |
Opens a TextReader on the given file
|
|
IFileOS ( string filename, |
Gets the writer.
|
|
IFileOS ( string sPath ) : bool |
Determines whether the specified file exists. Looks in m_existingFiles.Keys without making any adjustment for case or differences in normalization.
|
|
IFileOS ( string sPath ) : string[] |
Gets the files in the given directory.
|
|
IFileOS ( string sPath, string searchPattern ) : string[] |
Gets the files in the given directory.
|
|
IFileOS ( string filename ) : void |
Deletes the given file. This should probably be made case-insensitive
|
|
IFileOS ( string source, string destination ) : void |
Moves the specified source.
|
public AddExistingFile ( string filename ) : void | ||
filename | string | The filename (may or may not include path). |
return | void |
public AddFile ( string filename, string contents, |
||
filename | string | The filename (may or may not include path). |
contents | string | The contents of the file |
encoding | File encoding | |
return | void |
public static CreateFileContents ( bool fIncludeBOM, string sBookId ) : string | ||
fIncludeBOM | bool | Indicates whether file contents should include the byte /// order mark |
sBookId | string | The book id (if set, this will cause \id line to be written /// as the first line of the fiel) |
return | string |
public LockFile ( string filename ) : void | ||
filename | string | The filename (must have been added previously). |
return | void |
public MakeFile ( string contents ) : string | ||
contents | string | The contents of the file |
return | string |
public MakeFile ( string contents, |
||
contents | string | The contents of the file |
encoding | File encoding | |
return | string |
public MakeSfFile ( |
||
encoding | File encoding | |
fIncludeBOM | bool | Indicates whether file contents should include the byte /// order mark |
sBookId | string | The book id (if set, this will cause \id line to be written /// as the first line of the fiel) |
return | string |
public MakeSfFile ( bool fIncludeBOM, string sBookId ) : string | ||
fIncludeBOM | bool | Indicates whether file contents should include the byte /// order mark |
sBookId | string | The book id (if set, this will cause \id line to be written /// as the first line of the fiel) |
return | string |
public MakeSfFile ( string sBookId ) : string | ||
sBookId | string | The book id (if set, this will cause \id line to be written /// as the first line of the fiel) |
return | string |