cryptonemo / filepath

Get the filesystem path of a file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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());

About

Get the filesystem path of a file

License:Apache License 2.0


Languages

Language:Rust 100.0%