file owned

Tests whether a file exists and is of the user.

file owned NAME

Description

Gives 1 when NAME exists and belongs to the user of the process, else 0.

Arguments

ArgumentTypeDefaultDescription
NAMEpathrequiredThe path.

Returns

1 or 0.

Examples

% set f [open n.txt w]; close $f
> file owned n.txt
1

% file owned nope.txt
0

Errors

% file owned
wrong # args: should be "file owned 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