3 releases

Uses old Rust 2015

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

#498 in Filesystem

Download history 2007/week @ 2024-07-21 2049/week @ 2024-07-28 2496/week @ 2024-08-04 1895/week @ 2024-08-11 2343/week @ 2024-08-18 3409/week @ 2024-08-25 2320/week @ 2024-09-01 2955/week @ 2024-09-08 4351/week @ 2024-09-15 4528/week @ 2024-09-22 4541/week @ 2024-09-29 5441/week @ 2024-10-06 6561/week @ 2024-10-13 8403/week @ 2024-10-20 7353/week @ 2024-10-27 7263/week @ 2024-11-03

29,721 downloads per month
Used in 22 crates (17 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