makepath
makepath |
Purpose
Synopsis
procedure makepath(dirname:string|text)
procedure makepath(dirname:string|text,last_is_file:boolean)
Arguments
dirname
|
The name and path of the directory to be created
|
last_is_file
|
If
true, the last component of the path is ignored
|
Further information
1. This routine creates the directory
dirname as well as intermediate directories in the path if necessary. For instance,
makepath("/tmp/dir1/dir2") will create
"/tmp" then
"/tmp/dir1" before
"/tmp/dir1/dir2" if these directories are missing.
2. As opposed to
makedir, this routine does not return an error condition if the path already exists.
3. The second form of this procedure can be used when the argument is a path to a file in order to create the directory in which the file can be created. For instance,
makepath("/tmp/dir1/myfile",true) will create
"/tmp/dir1" such that file
/tmp/dir1/myfile" can be created.
Related topics
Module