equal
deleted
inserted
replaced
386 def is_executable(path: Path): Boolean = { |
386 def is_executable(path: Path): Boolean = { |
387 if (Platform.is_windows) Isabelle_System.bash("test -x " + bash_path(path)).check.ok |
387 if (Platform.is_windows) Isabelle_System.bash("test -x " + bash_path(path)).check.ok |
388 else path.file.canExecute |
388 else path.file.canExecute |
389 } |
389 } |
390 |
390 |
391 def set_executable(path: Path, flag: Boolean = false): Unit = { |
391 def set_executable(path: Path, reset: Boolean = false): Unit = { |
392 if (Platform.is_windows && flag) Isabelle_System.chmod("a+x", path) |
392 if (Platform.is_windows) Isabelle_System.chmod(if (reset) "a-x" else "a+x", path) |
393 else if (Platform.is_windows) Isabelle_System.chmod("a-x", path) |
393 else path.file.setExecutable(!reset, false) |
394 else path.file.setExecutable(flag, false) |
|
395 } |
394 } |
396 |
395 |
397 |
396 |
398 /* content */ |
397 /* content */ |
399 |
398 |