Skip to content

A library to split file path, like `/home/{user,admin}/file.txt`.

License

Notifications You must be signed in to change notification settings

Jimskapt/multipath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multipath   crates_badge doc_badge MIT_badge Cargo tests

A library to split file path, like /home/{user,admin}/file.txt.

⚠ Warning : this version now satisfies all the tests. However, I think the code need to be optimized !

Example :

fn main() {
    assert_eq!(
        multipath::parse("/home/{user,admin}/{Desktop,Download}/file.txt"),
        vec![
            "/home/user/Desktop/file.txt",
            "/home/user/Download/file.txt",
            "/home/admin/Desktop/file.txt",
            "/home/admin/Download/file.txt",
        ]
    );
}

Documentation

Please take a look to :