Skip to main content

get_attributes

Function get_attributes 

Source
pub fn get_attributes(file: &Path) -> Result<Vec<Attributes>, String>
Expand description

Get a list of attributes a file has.

§Params

file: &Path -> The path to the file.

§Returns

The result of a vector of the attributes.

§Examples

use std::path::Path;
use system_extensions::metadata::attribute::{get_attributes, Attributes};

attribs: Vec<Attributes> = get_attributes(Path::new("/test.txt")).unwrap();