chownSpec top-level property

FigSpec chownSpec
final

Implementation

final FigSpec chownSpec = FigSpec(
  name: 'chown',
  description: 'Change the user and/or group ownership of a given file, directory, or symbolic link',
  args: [
    FigArg(
      name: 'owner[:group] or :group',
      generators: [existingUsersandGroups],
    ),
    FigArg(
      name: 'file/directory',
      isVariadic: true,
      template: ['filepaths', 'folders'],
    ),
  ],
  options: [
    FigOption(
      name: '-f',
      description: "Don't report any failure to change file owner or group, nor modify the exit status to reflect such failures",
    ),
    FigOption(
      name: '-h',
      description: 'If the file is a symbolic link, change the user ID and/or the group ID of the link itself',
    ),
    FigOption(
      name: '-n',
      description: 'Interpret user ID and group ID as numeric, avoiding name lookups',
    ),
    FigOption(
      name: '-v',
      description: 'Cause chown to be verbose, showing files as the owner is modified',
    ),
    FigOption(
      name: '-R',
      description: 'Change the user ID and/or the group ID for the file hierarchies rooted in the files instead of just the files themselves',
    ),
    FigOption(
      name: '-H',
      description: 'If the -R option is specified, symbolic links on the command line are followed',
      exclusiveOn: ['-L', '-P'],
      dependsOn: ['-R'],
    ),
    FigOption(
      name: '-L',
      description: 'If the -R option is specified, all symbolic links are followed',
      exclusiveOn: ['-H', '-P'],
      dependsOn: ['-R'],
    ),
    FigOption(
      name: '-P',
      description: 'If the -R option is specified, no symbolic links are followed',
      exclusiveOn: ['-H', '-L'],
      dependsOn: ['-R'],
    ),
  ],
);