[This is preliminary documentation and is subject to change.]
Makes sure that the path format is valid, and optionally whether it is readable/writeable.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.3.5 (0.6.3.5)
Syntax
| C# |
public static bool TestFile( string fileLabel, string fileName, bool createIfDoesNotExist, FileAccess neededAccess )
Parameters
- fileLabel
- String
Name of the path that's being tested (e.g. "map path"). Used for logging.
- fileName
- String
Full or partial path of the file.
- createIfDoesNotExist
- Boolean
If target file is missing and this option is OFF, TestFile returns true. If target file is missing and this option is ON, TestFile tries to create a file and returns whether it succeeded.
- neededAccess
- FileAccess
If file is present, type of access to test.
Return Value
Whether target file passed all tests.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | fileLabel or fileName is null. |