grantPermissions static method

void grantPermissions(
  1. {required String folderPath}
)

Implementation

static void grantPermissions({
  required String folderPath,
}) {
  if (Platform.isWindows) {
    Process.runSync('icacls', [folderPath, '/grant', 'Users:(OI)(CI)RX']);
  } else {
    Process.runSync('chmod', ['-R', 'u+rX', folderPath]);
  }
}