#path #file

filepath

Get the filesystem path of a file

2 releases

Uses old Rust 2015

0.1.1 Aug 3, 2018
0.1.0 Aug 2, 2018

#56 in #path

Download history 24/week @ 2020-12-23 52/week @ 2020-12-30 34/week @ 2021-01-06 99/week @ 2021-01-13 78/week @ 2021-01-20 62/week @ 2021-01-27 22/week @ 2021-02-03 65/week @ 2021-02-10 46/week @ 2021-02-17 37/week @ 2021-02-24 72/week @ 2021-03-03 120/week @ 2021-03-10 172/week @ 2021-03-17 420/week @ 2021-03-24 335/week @ 2021-03-31 278/week @ 2021-04-07

210 downloads per month
Used in 2 crates

Apache-2.0/MIT

7KB
104 lines

filepath

Get the filesystem path of a file.

A simple extension trait for File that provides a single method path, which returns the path of a file.

Note: Not every file has a path. The path might be wrong for example after moving a file.

OS support: Linux, Mac, Windows

use std::fs::File;
use filepath::FilePath;

let mut file = File::create("foo.txt").unwrap();
println!("{:?}", file.path());

lib.rs:

filepath

filepath contains an extension trait for std::fs::File providing a path method.

Dependencies

~33KB