Skip to main content

Module utils

Module utils 

Source
Expand description

Utility functionality

Enums§

MkdirWithModeError
NetDevicesError
PathBufExtError
VerifyInodeError

Traits§

PathBufExt

Functions§

create_dir_all
create_dir_all_with_mode
Creates the specified directory and all parent directories with the specified mode. Ensures that the directory has been created with the correct mode and that the owner of the directory is the owner that has been specified
get_cgroup_path
If None, it will generate a default path for cgroups.
get_unix_user
Get a nix::unistd::User via UID. Potential errors will be ignored.
get_user_home
Get home path of a User via UID.
is_in_new_userns
open
parse_env
retry
rootless_required
Checks if rootless mode needs to be used
validate_mount_options
Validates mount destinations and warns about deprecated relative paths. Follows the OCI Runtime Spec requirement that mount destinations SHOULD be absolute. Relative paths are deprecated but still accepted for backward compatibility.
validate_spec_for_net_devices
validate_spec_for_new_user_ns
checks if given spec is valid for current user namespace setup
verify_inode
Verify file descriptor using stat and statfs, similar to runc’s VerifyInode.
write_file