src/Pure/General/file.scala
changeset 69789 2c3e5e58d93f
parent 69788 c175499a7537
child 71114 6cfec8029831
equal deleted inserted replaced
69788:c175499a7537 69789:2c3e5e58d93f
   347   {
   347   {
   348     if (Platform.is_windows) Isabelle_System.bash("test -x " + bash_path(path)).check.ok
   348     if (Platform.is_windows) Isabelle_System.bash("test -x " + bash_path(path)).check.ok
   349     else path.file.canExecute
   349     else path.file.canExecute
   350   }
   350   }
   351 
   351 
   352   def executable(path: Path)
   352   def set_executable(path: Path, flag: Boolean)
   353   {
   353   {
   354     if (Platform.is_windows) Isabelle_System.bash("chmod a+x " + bash_path(path)).check
   354     if (Platform.is_windows && flag) Isabelle_System.bash("chmod a+x " + bash_path(path)).check
   355     else path.file.setExecutable(true, false)
   355     else if (Platform.is_windows) Isabelle_System.bash("chmod a-x " + bash_path(path)).check
       
   356     else path.file.setExecutable(flag, false)
   356   }
   357   }
   357 }
   358 }