Crate iocore

Source
Expand description
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠟⠛⠛⠛⠛⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿                  ___ ___   ___
⣿⣿⣿⣿⣿⣿⡿⠟⣋⣡⣴⣶⣾⣿⡇⢸⣶⣄⠀⠀⠈⠙⠻⢿⣿⣿⣿⣿⣿⣿                 |_ _/ _ \ / __|___ _ _ ___
⣿⣿⣿⣿⡿⢋⣴⣾⣿⣿⣿⣿⣿⣿⡇⢸⣿⣿⣆⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿                  | | (_) | (__/ _ \ '_/ -_)
⣿⣿⣿⠏⣰⣿⣿⣿⣿⣿⣿⡿⠟⠛⠃⠘⢿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿                 |___\___/ \___\___/_| \___|
⣿⣿⠏⣸⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠈⢿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿
⣿⡏⢠⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿
⣿⠁⢸⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿                     _/_/_/          _/_/        _/
⣿⠀⢈⣉⣉⣉⣉⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿        _/      _/        _/      _/    _/    _/_/
⣿⡀⠀⠈⠛⠿⢿⣿⣷⣶⣤⣤⣤⣄⣀⣠⣤⣄⡉⠻⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿       _/      _/    _/_/        _/    _/      _/
⣿⣇⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠛⠛⠛⠛⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿        _/  _/          _/      _/    _/      _/
⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿         _/      _/_/_/    _/    _/_/    _/  _/
⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿
⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣦⣤⣤⣤⣤⣴⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

Re-exports§

pub use env::args;
pub use env::args_from_string;
pub use env::var;

Modules§

env

Macros§

env_var
env_var macro calls iocore::env::var, returns empty string and prints warning to stderr if the given environment variable is not set.
path_datetime_from_metadata_field
traceback

Structs§

Group
NoopProgressHandler
NoopProgressHandler is the builtin implementation of WalkProgressHandler which aggregates results insofar as the path given to path_matching exists at the moment the calling thread calls it.
OpenOptions
Path
Path is a data structure representing a path in unix filesystems that has practical methods for otherwise boring tasks, for instance, write writes bytes to a file, flushes bytes and syncs OS-internal data to the file-system, and if necessary, creates parents directories.
PathDateTime
PathPermissions
PathPermissions
PathTimestamps
PathTimestamps
Size
TILDE
USER
User
XPC
XPC_INFO

Enums§

ByteUnit
Error
Error represents various possible errors returned within the iocore crate
LsPathType
PathStatus
PathType

Constants§

ROOT_PATH_STR
USERS_PATH

Traits§

WalkProgressHandler
WalkProgressHandler trait defines a protocol outlining the behavior of walk_dir in terms of whether to aggregate paths in the final result, whether to scan a directory and whether an error should cause walk_dir to fail.

Functions§

add_trailing_separator
best_guess_home
expand_home_regex
get_stdout_string
get_subprocess_output
glob
guess_unix_home
parse_u32
path_str_to_relative_subpath
remove_absolute_path
remove_duplicate_separators
remove_end
remove_equal_prefix_from_path_strings
remove_redundant_current_path
remove_start
remove_trailing_slash
repl_beg
repl_end
safe_string
shell_command
Utility function to spawn a command from a string rather than array of arguments and returns the exit code. Stdout and Stderr are inherited from the current process.
shell_command_stdout
shell_command_stdout executes the given command and returns the stdout of the process.
shell_command_string_output
Utility function to spawn a command from a string rather than array of arguments and returns strings for stdout and stderr rather than Vec<u8>. Stdout and Stderr are sanitized for memory safety during String conversion.
shell_command_vec_output
Utility function to spawn a command from a string rather than array of arguments.
split_str_into_relative_subpath_parts
unix_user_info_home
walk_dir
walk_dir traverses the directory referenced in the path argument recursively obeying the protocol by the handler argument.
walk_globs

Type Aliases§

Depth
Result