Function std::old_io::fs::statUnstable
[-] [+]
[src]
pub fn stat(path: &Path) -> IoResult<FileStat>
Given a path, query the file system to get information about a file, directory, etc. This function will traverse symlinks to query information about the destination file.
Example
fn main() { use std::old_io::fs; let p = Path::new("/some/file/path.txt"); match fs::stat(&p) { Ok(stat) => { /* ... */ } Err(e) => { /* handle error */ } } }use std::old_io::fs; let p = Path::new("/some/file/path.txt"); match fs::stat(&p) { Ok(stat) => { /* ... */ } Err(e) => { /* handle error */ } }
Error
This function will return an error if the user lacks the requisite permissions
to perform a stat
call on the given path
or if there is no entry in the
filesystem at the provided path.