FileInfo¶
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.
Constructors¶
create¶
This will raise an error if the FileStat capability isn't available or the path doesn't exist.
Parameters¶
- from: FilePath val
Returns¶
- FileInfo val^ ?
Public fields¶
let filepath: FilePath val¶
let mode: FileMode val¶
UNIX-style file mode.
let hard_links: U32 val¶
Number of hardlinks to this filepath
.
let device: U64 val¶
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.
let inode: U64 val¶
UNIX specific INODE number of filepath
. Is 0 on Windows.
let uid: U32 val¶
UNIX-style user ID of the owner of filepath
.
let gid: U32 val¶
UNIX-style user ID of the owning group of filepath
.
let size: USize val¶
Total size of filepath
in bytes.
In case of a symlink this is the size of the target, not the symlink itself.
let access_time: (I64 val , I64 val)¶
Time of last access as a tuple of seconds and nanoseconds since the epoch:
let modified_time: (I64 val , I64 val)¶
Time of last modification as tuple of seconds and nanoseconds since the epoch:
let change_time: (I64 val , I64 val)¶
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:
On Windows this will be the file creation time.
let file: Bool val¶
true
if filepath
points to an a regular file.
let directory: Bool val¶
true
if filepath
points to a directory.
let pipe: Bool val¶
true
if filepath
points to a named pipe.
let symlink: Bool val¶
true
if filepath
points to a symbolic link.
let broken: Bool val¶
true
if filepath
points to a broken symlink.