Method CreateFilePathSafe
CreateFilePathSafe(string)
Creates the directory for the specified file path if it does not already exist. This method is a safe version of CreateFilePath(string) that catches exceptions.
public static bool CreateFilePathSafe(string pathToFile)
Parameters
pathToFilestringThe file path for which the directory should be created.
Returns
- bool
trueif the directory was successfully created or already exists; otherwise,falseif an exception occurred.