file mkdir
Makes folders, with each missing parent folder.
file mkdir ?DIR ...?
Description
Makes each DIR, and each missing folder on its path, as mkdir -p does. A DIR that is already a folder is no error. A DIR, or a folder of its path, that is a file is an error. With no DIR it gives an empty string and makes no folder.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| DIR | path | none | A folder to make. |
Returns
An empty string.
Examples
% file mkdir d1/d2/d3
> file isdirectory d1/d2/d3
1
# A folder that exists is no error.
% file mkdir a/b
> file mkdir a/b
Errors
% set f [open x w]; close $f
> file mkdir x
can't create directory "x": file already exists
-errorcode POSIX EEXIST {file already exists}
Facts
- Capability
file. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1