[go: up one dir, main page]

fsio 0.3.1

File System and Path utility functions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

#[test]
fn from_path_string() {
    let path = Path::new("./test/file.txt");
    let from_path: String = FromPath::from_path(&path);

    assert_eq!("./test/file.txt", from_path);
}

#[test]
fn from_path_path_buf() {
    let path = Path::new("./test/file.txt");
    let from_path: PathBuf = FromPath::from_path(&path);

    assert_eq!(path.to_path_buf(), from_path);
}