[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: fCraft
Assembly: fCraft (in fCraft.dll) Version: 0.6.3.0 (0.6.3.0)

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.

See Also