CreateDirIfNotExist Method
- Last UpdatedNov 06, 2025
- 1 minute read
Function to create a sub-directory in the specified parent directory if it does NOT already exist
'Declaration
Public Shared Function CreateDirIfNotExist( _
ByVal parentDir As String, _
ByVal subDirName As String _
) As String
'Usage
Dim parentDir As String
Dim subDirName As String
Dim value As String
value = FileHelper.CreateDirIfNotExist(parentDir, subDirName)
public static string CreateDirIfNotExist(
string parentDir,
string subDirName
)
Parameters
- parentDir
- The parent directory in which the sub-directory is to be created
- subDirName
- The name of the sub-directory to be created
Return Value
Returns the path of the sub directory just created as a string