Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bytestring-net/pathio
Data type for storing generic data on a virtual path tree hierarchy. The data is stored in memory, this is not OS file system abstraction, but immitation
https://github.com/bytestring-net/pathio
Last synced: about 1 month ago
JSON representation
Data type for storing generic data on a virtual path tree hierarchy. The data is stored in memory, this is not OS file system abstraction, but immitation
- Host: GitHub
- URL: https://github.com/bytestring-net/pathio
- Owner: bytestring-net
- License: apache-2.0
- Created: 2023-09-19T19:09:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-22T09:11:20.000Z (about 1 year ago)
- Last Synced: 2024-04-24T03:23:58.697Z (8 months ago)
- Language: Rust
- Size: 65.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Pathio
#
Crate adding *`PathTree`*, a special type immitating **UNIX** file system for storing any generic type ``.
## === Description ===
It is created by daisy chaining *HashMaps*. It splits data into directories, which can store `` or nest subdirectories.
```rust
use pathio::prelude::*;let mut tree: PathTree = PathTree::new("FileSystem");
tree.create_directory("New_Folder").unwrap();
tree.create_directory("New_Folder/Strings").unwrap();
tree.create_directory("Cool_Folder").unwrap();tree.insert_file("New_Folder/Strings/text.txt", "Hello World!".to_string()).unwrap();
println!("{}", tree.list());
```
Console output:
```
> FileSystem
|-> Cool_Folder
|-> New_Folder
| |-> Strings
| | |-> text.txt
```## === Contributing ===
Any contribution submitted by you will be dual licensed as mentioned below, without any additional terms or conditions.
## === Licensing ===
Released under both [APACHE](./LICENSE-APACHE) and [MIT](./LICENSE-MIT) licenses, for the sake of compatibility with other projects. Pick one that suits you the most!