getPermissionToolArgs method
Get permission tool arguments used to change files permissions
Implementation
List<String> getPermissionToolArgs(final Directory directory) {
switch (this) {
case OperatingSystem.windows:
return <String>[directory.path, '/t', '/q', '/grant', 'Everyone:RX'];
case OperatingSystem.macOs:
case OperatingSystem.linux:
// Look for a item of type file, for each of those files
// make them executable.
return <String>[
directory.path,
'-type',
'f',
'-exec',
'chmod',
'+x',
'{}',
';',
];
default:
throw const UnsupportedOsException();
}
}