qubit-fs 0.1.0

Pluggable filesystem abstraction for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use qubit_fs::{
    DirEntry,
    FileKind,
    FsPath,
};

#[test]
fn test_dir_entry_new_derives_file_name() {
    let entry = DirEntry::new(
        FsPath::parse("/dir/file.txt").expect("path should parse"),
        FileKind::File,
    );

    assert_eq!("file.txt", entry.name);
    assert_eq!(FileKind::File, entry.kind);
}