logo

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

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)

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.