8 个版本
| 0.1.13 | 2023 年 9 月 18 日 |
|---|---|
| 0.1.12 | 2023 年 8 月 31 日 |
| 0.1.11 | 2023 年 7 月 15 日 |
| 0.1.8 | 2023 年 3 月 20 日 |
| 0.1.6 | 2022 年 5 月 10 日 |
#382 在 文件系统
50 每月下载量
39KB
1K SLoC
这是一个库和二进制文件。
警告
API 可能不稳定。你可能不应该使用这个crate。
API
泛型
print(str|array|bool)debug(str|array)prompt(str)panic(str)uuid_v4env_var(str)trim(str)lowercase(str)uppercase(str)starts_with(str, str)ends_with(str, str)sort_strs(array)env_os()返回 windows | linux | unknownsleep(ms)
命令 API
cmd(str|array)cmd.arg(str)cmd.args(array)cmd.dir(str)cmd.env(str, str)cmd.env_clear()cmd.executecmd.outputcmd::execute_parallel
文件系统 API
fs::is_dir(str)fs::is_file(str)fs::is_prog(str)fs::create_dir(str)fs::write(str, str|array)数组转换为行fs::read(str)fs::delete(str)fs::move(str, str)fs::copy(str, str)fs::full_path(str)fs::append(path: str, str|array)数组转换为行fs::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)
正则表达式 API
regex(pat: str)regex.matches(in: str) -> boolregex.replace(where: str,with: str)regex.find(in: str) -> strregex.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)
依赖
~19MB
~414K SLoC