This contains file system metadata for a path.
A symlink will report information about itself, other than the size which will be the size of the target. A broken symlink will report as much as it can and will set the broken flag.
class val FileInfo
This will raise an error if the FileStat capability isn't available or the path doesn't exist.
new val create( from: FilePath val) : FileInfo val^ ?
This will raise an error if the FileStat capability isn't available or the file descriptor is invalid.
new val _descriptor( fd: I32 val, path: FilePath val) : FileInfo val^ ?
new val _relative( fd: I32 val, path: FilePath val, from: String val) : FileInfo val^ ?
UNIX-style file mode.
Number of hardlinks to this filepath
.
OS id of the device containing this filepath
. Device IDs consist of a major and minor device id, denoting the type of device and the instance of this type on the system.
UNIX specific INODE number of filepath
. Is 0 on Windows.
UNIX-style user ID of the owner of filepath
.
UNIX-style user ID of the owning group of filepath
.
Total size of filepath
in bytes.
In case of a symlink this is the size of the target, not the symlink itself.
Time of last access as a tuple of seconds and nanoseconds since the epoch:
(let a_secs: I64, let a_nanos: I64) = file_info.access_time
Time of last modification as tuple of seconds and nanoseconds since the epoch:
(let m_secs: I64, let m_nanos: I64) = file_info.modified_time
Time of the last change either the attributes (number of links, owner, group, file mode, ...) or the content of filepath
as a tuple of seconds and nanoseconds since the epoch:
(let c_secs: I64, let c_nanos: I64) = file_info.change_time
On Windows this will be the file creation time.
true
if filepath
points to an a regular file.
true
if filepath
points to a directory.
true
if filepath
points to a named pipe.
true
if filepath
points to a symbolic link.
true
if filepath
points to a broken symlink.
© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/files-FileInfo