[−][src]Module fungus::sys
Modules
exec | |
ext | |
libc | |
user |
Structs
Chmod | Chmod provides flexible options for changing file permission with optional configuration. |
Copyfile | Copyfile provides a flexible options for copying files |
Info | Type of operating system rust is running on |
Stdio |
Enums
Arch | Type of operating system rust is running on |
Platform | Type of operating system rust is running on |
Traits
PathColorExt | |
PathExt |
Functions
abs | Return the path in an absolute clean form |
all_dirs | Returns all directories for the given path recurisely, sorted by filename. Handles path expansion. Paths are returned as abs paths. Doesn't include the path itself. Paths are guaranteed to be distinct. |
all_files | Returns all files for the given path recursively, sorted by filename. Handles path expansion. Paths are returned as abs paths. Doesn't include the path itself. Paths are guaranteed to be distinct. |
all_paths | Returns all paths for the given path recursively, sorted by filename. Handles path expansion. Paths are returned as abs paths. Doesn't include the path itself. Paths are guaranteed to be distinct. |
arch | Detect at runtime the system architecture rust is running on. |
args | Returns the arguments that this program was started with (normally passed via the command line). Wraps std::env::args |
chmod | Wraps |
chmod_p | Create |
chown | Change the ownership of the |
copy | Copies src to dst recursively creating destination directories as needed and handling path expansion and globbing e.g. copy("./*", "../") and returning an absolute path of the destination. |
copyfile | Wraps |
copyfile_p | Copies a single file from src to dst, creating destination directories as needed and handling path expansion and optionally following links. |
cwd | Returns the current working directory as a |
digest | Computes and returns the digest of the given |
dirs | Returns all directories for the given path, sorted by filename. Handles path expansion. Paths are returned as abs paths. Doesn't include the path itself only its children nor is this recursive. |
exe | Returns the full filesystem path of the current running executable. Wraps std::env::current_exec |
exists | Returns true if the given path exists. Handles path expansion. |
expand | Expand all environment variables in the path as well as the home directory. |
extract_string | Returns the first captured string from the given regular expression |
extract_string_p | Returns the first captured string from the given regular expression |
extract_strings | Returns the captured strings from the given regular expression |
extract_strings_p | Returns the captured strings from the given regular expression |
files | Returns all files for the given path, sorted by filename. Handles path expansion. Paths are returned as abs paths. Doesn't include the path itself only its children nor is this recursive. |
flag | Get the value of the given environment variable as a flag. |
flag_default | Get the value of the given environment variable as a flag using a default if not set |
gid | Returns the group ID of the owner of this file. Handles path expansion. |
glob | Returns a vector of all paths from the given target glob with path expansion and sorted by name. Doesn't include the target itself only its children nor is this recursive. |
hastty | Determine if the environment has an attached tty |
info | Get system information |
is_dir | Returns true if the given path exists and is a directory. Handles path expansion. |
is_exec | Returns true if the given path exists and is an executable. Handles path expansion |
is_file | Returns true if the given path exists and is a file. Handles path expansion |
is_readonly | Returns true if the given path exists and is readonly. Handles path expansion |
is_symlink | Returns true if the given path exists and is a symlink. Handles path expansion |
is_symlink_dir | Returns true if the given path exists and is a symlinked directory. Handles path expansion |
is_symlink_file | Returns true if the given path exists and is a symlinked file. Handles path expansion |
lchown | Change the ownership of the |
linux | True if rust is running on linux |
macos | True if rust is running on macos |
mash | Returns a new owned |
metadata | Returns the Metadata object for the |
mkdir | Creates the given directory and any parent directories needed, handling path expansion and returning an absolute path created. |
mkdir_p | Wraps |
move_p | Move a file or directory handling path expansion and globbing. Replaces destination files if
exist but always moves |
parse_paths | Parse unix shell pathing e.g. $PATH, $XDG_DATA_DIRS or $XDG_CONFIG_DIRS. List of directories seperated by : |
paths | Returns all directories/files for the given path, sorted by filename. Handles path expansion. Paths are returned as abs paths. Doesn't include the path itself only its children nor is this recursive. |
platform | Detect at runtime the type of operating system we are running. |
readbytes | Returns the contents of the |
readlines | Returns all lines from teh file as a |
readlines_p | Returns an Iterator to the Reader of the lines of the file. |
readlink | Returns the absolute path for the given link target. Handles path expansion |
readstring | Returns the contents of the |
remove | Removes the given empty directory or file. Handles path expansion. Does not follow symbolic links but rather removes the links themselves. |
remove_all | Removes the given directory after removing all of its contents. Handles path expansion. Does not follow symbolic links but rather removes the links themselves. |
revoking_mode | Returns true if the new mode is revoking permissions as compared to the old mode as pertains directory read/execute permissions. This is useful when recursively modifying file permissions. |
set_cwd | Changes the current working directory to the specified path. Provides basic path expansion |
set_var | Sets the environment variable |
symlink | Creates a new symbolic link. Handles path expansion and returns an absolute path to the link while still creating the symbolic link as a relative path to the target. |
touch | Create an empty file similar to the linux touch command. Handles path expansion. Uses default file creation permissions 0o666 - umask usually ends up being 0o644. |
touch_p | Wraps |
uid | Returns the user ID of the owner of this file. Handles path expansion. |
unset_var | Unset an environment variable from the environment of the currently running process. Wraps std::env::remove_var |
var | Fetches the environment variable |
vars | Returns an iterator of (variable, value) pairs of strings, for all the environment variables of the current process. Wraps std::env::vars |
windows | True if rust is running on windows |
write | Write |
write_p | Wraps |
writelines | Write |
writelines_p | Wraps |
x86 | Returns true if the system is a x86 system. |
x86_64 | Returns true if the system is a x86_64 system. |