CreateDirIfNotExist Method
- Last UpdatedNov 06, 2025
- 1 minute read
The CreateDirIfNotExist() method creates a sub-directory in the specified parent directory if the sub-directory does not already exist.
'Declaration
Public Shared Function CreateDirIfNotExist( _
ByVal parentDir As String, _
ByVal subDirName As String _
) As String
public static string CreateDirIfNotExist(
string parentDir,
string subDirName
)
Parameters
- parentDir
- Required. Holds the directory in which to create the sub-directory.
- subDirName
- Required. Holds the name of the new sub-directory.
Return Value
Returns a string that contains the full path to the newly created
sub-directory.