| Crates.io | filepath |
| lib.rs | filepath |
| version | 0.2.0 |
| created_at | 2018-08-02 22:21:09.885599+00 |
| updated_at | 2024-12-26 17:44:08.98414+00 |
| description | Get the filesystem path of a file. |
| homepage | |
| repository | https://github.com/evilpie/filepath |
| max_upload_size | |
| id | 77225 |
| size | 20,115 |
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 and iOS
use std::fs::File;
use filepath::FilePath;
let mut file = File::create("foo.txt").unwrap();
println!("{:?}", file.path());