--- a/src/Pure/General/ssh.scala Thu Jun 15 14:45:21 2023 +0200
+++ b/src/Pure/General/ssh.scala Thu Jun 15 15:04:23 2023 +0200
@@ -241,6 +241,11 @@
if (cmd.nonEmpty) run_sftp(cmd + " " + sftp_path(path))
}
+ override def restrict(path: Path): Unit =
+ if (!execute("chmod g-rwx,o-rwx " + bash_path(path)).ok) {
+ error("Failed to change permissions of " + quote(remote_path(path)))
+ }
+
override def set_executable(path: Path, flag: Boolean = false): Unit =
if (!execute("chmod a" + (if (flag) "+" else "-") + "x " + bash_path(path)).ok) {
error("Failed to change executable status of " + quote(remote_path(path)))
@@ -402,6 +407,7 @@
def is_dir(path: Path): Boolean = path.is_dir
def is_file(path: Path): Boolean = path.is_file
def delete(path: Path): Unit = path.file.delete
+ def restrict(path: Path): Unit = File.restrict(path)
def set_executable(path: Path, flag: Boolean = false): Unit =
File.set_executable(path, flag = flag)
def make_directory(path: Path): Path = Isabelle_System.make_directory(path)