Ensures the specified directory exists on the file system. If the specified directory does not exist, a new one is to be created.
public bool EnsuresDirectoryCreated(
string directoryPath
)
Public Function EnsuresDirectoryCreated( _
ByVal directoryPath As String _
) As Boolean
public:
bool EnsuresDirectoryCreated(
String^ directoryPath
);
Parameters
- directoryPath
- The directory path to check and create if needed.
Return Value
true
if the directory already exists; otherwise, the specified directory does not exist before calling this method, and it has been created.
Remarks
This method checks if the directory and its parents exist. If one of them does not exist, the specified directory is created.