setFileExecutablePermission static method
Implementation
static void setFileExecutablePermission(File file, bool executable) {
if (file.path.endsWith('.dart')) return;
if (Platform.isLinux || Platform.isMacOS) {
var mode = executable ? '+rx' : '-rx';
var chmodPath = whichExecutablePath('chmod');
Process.runSync(chmodPath, [mode, file.path]);
}
}