8 releases
0.1.13 | Sep 18, 2023 |
---|---|
0.1.12 | Aug 31, 2023 |
0.1.11 | Jul 15, 2023 |
0.1.8 | Mar 20, 2023 |
0.1.6 | May 10, 2022 |
#492 in Filesystem
53 downloads per month
39KB
1K
SLoC
This is a library and a binary.
Warning
The api may not be stable. You should probably not use this crate.
Api
Generic
print(str|array|bool)
debug(str|array)
prompt(str)
panic(str)
uuid_v4
env_var(str)
trim(str)
lowercase(str)
uppercase(str)
starts_with(str, str)
ends_with(str, str)
sort_strs(array)
env_os()
returns windows | linux | unknownsleep(ms)
Command api
cmd(str|array)
cmd.arg(str)
cmd.args(array)
cmd.dir(str)
cmd.env(str, str)
cmd.env_clear()
cmd.execute
cmd.output
cmd::execute_parallel
Fs api
fs::is_dir(str)
fs::is_file(str)
fs::is_prog(str)
fs::create_dir(str)
fs::write(str, str|array)
array is converted to linesfs::read(str)
fs::delete(str)
fs::move(str, str)
fs::copy(str, str)
fs::full_path(str)
fs::append(path: str, str|array)
array is converted to linesfs::contains(str, str)
fs::read_dir(str)
fs::which(str)
Git api
git(path: str)
git_clone(url: str, path: str)
git.diff()
git.apply_diff(diff)
git.force_head()
git.checkout_tag(str)
diff_from_file(str)
diff.print()
diff.to_file(str)
diff.to_string()
diff_from_file(str)
Regex api
regex(pat: str)
regex.matches(in: str) -> bool
regex.replace(where: str, with: str)
regex.find(in: str) -> str
regex.captures(in: str) -> [str]
regex.captures_all(in: str) -> [str]
regex.replace_file(path: str, with: str)
regex.matches_file(path: str) -> bool
Toml api
toml::read(str)
toml::parse(str)
toml::write(str, dyn)
toml::stringify(dyn)
Dependencies
~21MB
~421K SLoC