DirMake Function | |
Create a directory.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION DirMake(
pszNewDir AS STRING
) AS LONG
public static int DirMake(
string pszNewDir
)
Request Example
View SourceParameters
- pszNewDir
- Type: String
The name of the directory to create, including an optional drive.
If you do not specify a drive, the Windows default is used.
Return Value
Type:
Long
0 if successful; -1 if there is an argument error; otherwise, the DOS error code.
Remarks
DirMake() creates a specified directory. You must have sufficient rights to create a directory.
To create nested subdirectories, you must create each subdirectory separately, starting from the top-level directory that you want to create (see example below.)
Examples
This example assumes that C:\VO exists and uses DirMake() twice to create a nested subdirectory under it:
1DirMake("c:\vo\one")
2siResult := DirMake("c:\vo\one\two")
3IF siResult != 0
4 ? DOSErrString(siResult)
See Also