3 releases

Uses old Rust 2015

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

#503 in Filesystem

Download history 1798/week @ 2024-01-05 1997/week @ 2024-01-12 1737/week @ 2024-01-19 2138/week @ 2024-01-26 2238/week @ 2024-02-02 2132/week @ 2024-02-09 2270/week @ 2024-02-16 2264/week @ 2024-02-23 2875/week @ 2024-03-01 3325/week @ 2024-03-08 3008/week @ 2024-03-15 2270/week @ 2024-03-22 2296/week @ 2024-03-29 3351/week @ 2024-04-05 3040/week @ 2024-04-12 2534/week @ 2024-04-19

11,732 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