[go: up one dir, main page]

chown_base

Function chown_base 

Source
pub fn chown_base(
    command: Command,
    args: impl Args,
    add_arg_if_not_reference: &'static str,
    parse_gid_uid_and_filter: fn(&ArgMatches) -> UResult<GidUidOwnerFilter>,
    groups_only: bool,
) -> UResult<()>
Expand description

Base implementation for chgrp and chown.

An argument called add_arg_if_not_reference will be added to command if args does not contain the --reference option. parse_gid_uid_and_filter will be called to obtain the target gid and uid, and the filter, from ArgMatches. groups_only determines whether verbose output will only mention the group.