file isdirectory

Tests whether a path is a folder.

file isdirectory NAME

Description

Gives 1 when NAME is a folder, else 0, also when NAME does not exist.

Arguments

ArgumentTypeDefaultDescription
NAMEpathrequiredThe path.

Returns

1 or 0.

Examples

% file mkdir data
> file isdirectory data
1

% file isdirectory nope
0

Errors

% file isdirectory
wrong # args: should be "file isdirectory name"
-errorcode TCL WRONGARGS

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

See also