stat. Retrieving information about a file

^file::stat[filename]
Object created by this constructor has additional fields (objects of class date).

$some_file.size-size of file in bytes;
$some_file.cdate-creation date;
$some_file.mdate-modification date;
$some_file.adate-last access date.

filename-path and name of file.

Example

$f[^file::stat[some.zip]]
Size in bytes: $f.size<br />
Created in: $f.cdate.year<br />
$new_after[^date::now(-3)]
Status: ^if($f.mdate >= $new_after){new;old}


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 21.09.2007