Struct cap_std::fs::Metadata[][src]

pub struct Metadata { /* fields omitted */ }
Expand description

Metadata information about a file.

This corresponds to std::fs::Metadata.

We need to define our own version because the libstd `Metadata` doesn't have a public constructor that we can use.

Implementations

Constructs a new instance of Self from the given std::fs::File.

Constructs a new instance of Self from the given std::fs::Metadata.

As with the comments in std::fs::Metadata::volume_serial_number and nearby functions, some fields of the resulting metadata will be None.

Returns the file type for this metadata.

This corresponds to std::fs::Metadata::file_type.

Returns true if this metadata is for a directory.

This corresponds to std::fs::Metadata::is_dir.

Returns true if this metadata is for a regular file.

This corresponds to std::fs::Metadata::is_file.

Returns the size of the file, in bytes, this metadata is for.

This corresponds to std::fs::Metadata::len.

Returns the permissions of the file this metadata is for.

This corresponds to std::fs::Metadata::permissions.

Returns the last modification time listed in this metadata.

This corresponds to std::fs::Metadata::modified.

Returns the last access time of this metadata.

This corresponds to std::fs::Metadata::accessed.

Returns the creation time listed in this metadata.

This corresponds to std::fs::Metadata::created.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the ID of the device containing the file. Read more

Returns the inode number. Read more

Returns the rights applied to this file. Read more

Returns the number of hard links pointing to this file. Read more

Returns the user ID of the owner of this file. Read more

Returns the group ID of the owner of this file. Read more

Returns the device ID of this file (if it is a special one). Read more

Returns the total size of this file in bytes. Read more

Returns the last access time of the file, in seconds since Unix Epoch. Read more

Returns the last access time of the file, in nanoseconds since atime. Read more

Returns the last modification time of the file, in seconds since Unix Epoch. Read more

Returns the last modification time of the file, in nanoseconds since mtime. Read more

Returns the last status change time of the file, in seconds since Unix Epoch. Read more

Returns the last status change time of the file, in nanoseconds since ctime. Read more

Returns the block size for filesystem I/O. Read more

Returns the number of blocks allocated to the file, in 512-byte units. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.