Crates.io | lust |
lib.rs | lust |
version | 0.1.1 |
source | src |
created_at | 2017-12-03 04:12:38.979142 |
updated_at | 2017-12-03 04:47:13.926593 |
description | A Rust library intended for finding out everything about your beloved file system |
homepage | |
repository | https://github.com/SeanPrashad/Lust |
max_upload_size | |
id | 41510 |
size | 15,367 |
A Rust library designed to provide simple data for a given file path!
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
get_file_name(file_path: &str)
- returns the file name (as an OsString
), given an absolute or relative pathlet file_name = get_file_name("C:/Users/JohnDoe/Desktop/repos/Lust/README.md");
println!("{:?}", file_name); //prints "README.md"
get_file_size(file_path: &str)
- returns the file size (as a u64
), given an absolute or relative pathlet file_size = get_file_size("C:/Users/JohnDoe/Desktop/repos/Lust/README.md");
println!("{:?}", file_size); //prints "82"
generate_sha1(file_path: &str)
- returns the sha1 hash (as a String
), given an absolute or relative pathlet sha1_hash = generate_sha1("C:/Users/JohnDoe/Desktop/repos/Lust/README.md");
println!("{:?}", sha1_hash); //prints "e2ae20d9ae7fcacb605c03c198e0a1c51d446f50"
generate_md5(file_path: &str)
- returns the md5 hash (as a String
), given an absolute or relative pathlet md5_hash = generate_md5("C:/Users/JohnDoe/Desktop/repos/Lust/README.md");
println!("{:?}", md5_hash); //prints "b958ee170050ed7a2f93509f13bf16c3"
Below you'll find what's required to build and compile Lust:
OSX/Unix installation (via Terminal):
curl -sSf https://static.rust-lang.org/rustup.sh | sh
Instructions for Microsoft Windows may be found here.
Further installation instructions can be found here.
After installing the prerequisites listed above, you're ready to build!
git clone https://github.com/SeanPrashad/Lust.git
Or by downloading the .zip
equivalent, found here.
Note: Remember to extract the .zip
file to a location where you conduct your work!
cd
into the downloaded repository using your Terminal (or Git Bash if on Windows):cd whereMyReposAreStored/Lust/
cargo build
Note: Supply the --verbose
argument to get a more detailed output (ie. cargo build --verbose
)
The test suite can be found within src/lib.rs
in the module tests
. To build and run all test suites, simply use:
cargo test
Note: Supply the --verbose
argument to get a more detailed output (ie. cargo test --verbose
)
Rust comes with a built-in linter, Clippy, that's automatically configured to run when you build Lust.
To invoke Clippy on-demand, simply run:
cargo clippy
Note: Supply the --verbose
argument to get a more detailed output (ie. cargo clippy --verbose
). More information can be found here.
Any and all contributions are welcome, regardless of your programming expertise. Please refer to CONTRIBUTING.md for details on how to get started.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details.