Skip to content

Commit

Permalink
doc: add doc string and change some path with the fortcihe path
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleailes committed Oct 31, 2023
1 parent 4e0e902 commit 851d5c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors = ["Philippe Llerena<[email protected]>"]
description = "A web server to deliver basic File System informations"
readme = "README.md"
license-file = "LICENSE"
documentation = "https://github.com/doubleailes/quiet-stroll/blob/main/README.md"
repository = "https://github.com/doubleailes/quiet-stroll"
documentation = "https://github.com/forticheprod/quiet-stroll/blob/main/README.md"
repository = "https://github.com/forticheprod/quiet-stroll"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ impl QuietPaths {
paths_list: get_walk(input_path.input_path.as_str()),
}
}
/// Create a QuietPaths from a get_walk function
pub fn to_paths(&self) -> Paths {
let data: Vec<PathBuf> = self
.paths_list
Expand All @@ -95,6 +96,7 @@ impl QuietPaths {
.collect::<Vec<PathBuf>>();
Paths::new(data)
}
/// Create a QuietPaths from a get_walk function
pub fn from_paths(paths: Paths) -> Self {
let paths_list: Vec<String> = paths
.par_iter()
Expand All @@ -104,9 +106,12 @@ impl QuietPaths {
paths_list: paths_list,
}
}
/// Pack a quiet path to a basic listing using framels lib
pub fn packed(&self) -> Self {
QuietPaths::from_paths(basic_listing(self.to_paths()).get_paths())
}
/// create a QuietPaths from a string
/// mainly for testing purpose
pub fn from_string(s: String) -> Self {
QuietPaths {
paths_list: vec![s],
Expand Down

0 comments on commit 851d5c2

Please sign in to comment.