Function brane_shr::fs::set_permissions
source · pub fn set_permissions(
path: impl AsRef<Path>,
permissions: PermissionSet,
) -> Result<(), Error>
Expand description
Changes the permissions of the given file to the given triplet.
§Arguments
path
: The path of the file to change the permissions of.permissions
: ThePermissionSet
to change to.
§Errors
This function errors if we failed to update the permissions - probably either because the file did not exist, or we do not have the required permisisons ourselves.