3 releases

Uses old Rust 2015

0.1.2 May 6, 2022
0.1.1 Aug 3, 2018
0.1.0 Aug 2, 2018

#481 in Filesystem

Download history 1198/week @ 2023-12-06 1382/week @ 2023-12-13 845/week @ 2023-12-20 668/week @ 2023-12-27 1555/week @ 2024-01-03 2006/week @ 2024-01-10 1833/week @ 2024-01-17 1922/week @ 2024-01-24 2157/week @ 2024-01-31 2184/week @ 2024-02-07 2324/week @ 2024-02-14 2334/week @ 2024-02-21 2566/week @ 2024-02-28 3041/week @ 2024-03-06 3132/week @ 2024-03-13 2215/week @ 2024-03-20

11,442 downloads per month
Used in 19 crates (14 directly)

Apache-2.0/MIT

7KB
101 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

~185KB