Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]

Method file_stat()


Method file_stat

Stdio.Stat file_stat(string path, void|int(0..1) symlink)

Description

Stat a file.

If the argument symlink is 1 symlinks will not be followed.

Returns

If the path specified by path doesn't exist 0 (zero) will be returned.

Otherwise an object describing the properties of path will be returned.

Note

In Pike 7.0 and earlier this function returned an array with 7 elements. The old behaviour can be simulated with the following function:

array(int) file_stat(string path, void|int(0..1) symlink) { File.Stat st = predef::file_stat(path, symlink); if (!st) return 0; return (array(int))st; }

See also

Stdio.Stat , Stdio.File->stat()