3 releases

Uses old Rust 2015

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

#489 in Filesystem

Download history 3109/week @ 2024-03-14 2278/week @ 2024-03-21 2265/week @ 2024-03-28 3347/week @ 2024-04-04 2943/week @ 2024-04-11 3143/week @ 2024-04-18 1903/week @ 2024-04-25 1328/week @ 2024-05-02 1879/week @ 2024-05-09 1856/week @ 2024-05-16 1653/week @ 2024-05-23 1686/week @ 2024-05-30 1904/week @ 2024-06-06 2468/week @ 2024-06-13 2359/week @ 2024-06-20 1914/week @ 2024-06-27

8,990 downloads per month
Used in 20 crates (15 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