quick_file

Crates.ioquick_file
lib.rsquick_file
version0.2.0
sourcesrc
created_at2022-02-14 17:50:59.667496
updated_at2022-02-16 13:04:02.743703
descriptionQuickly read and write to files without needing to worry about file paths and operating systems
homepage
repositoryhttps://github.com/KJ002/quick_file
max_upload_size
id532331
size4,651
James Butcher (KJ002)

documentation

README

quick_file

Quickly read and write to files without needing to worry about file paths and operating systems

Usage

Usage is pretty easy, as this is what this crate is designed for. Your code should look something like this:

let config = ConfigManager::new("foobar");

let lorem_ipsum = "
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
";

config.write("lorem.txt", lorem_ipsum);

If this is ran on Windows this would create a folder in the location of the users appdata (%APPDATA%) named foobar. However, on Linux and MacOS a folder named foobar would be created at the location of the users home (~), this is determined by the HOME environment variable and likewise the location of %APPDATA% is determined by the APPDATA environment variable.

Commit count: 14

cargo fmt