Function get_metadata

Source
pub fn get_metadata<Path: AsRef<str>>(file_path: &Path) -> Result<Metadata>
Expand description

Queries metadata about the underlying file.

§Returns

Result<Metadata>

§Examples

fn main() -> std::io::Result<()> {
    Ok({
        let file_path: &str = "Cargo.toml";
        let file_path: String = String::from(file_path);

        let metadata: std::fs::Metadata = file_access::get_metadata(&file_path)?;
        println!("{:#?}", metadata);
    })
}