src/Pure/General/file.scala
changeset 64345 b89c29ea208f
parent 64304 96bc94c87a81
child 64482 43f6c28ff496
equal deleted inserted replaced
64344:c1695143de35 64345:b89c29ea208f
   218     write_xz(path.file, text, options)
   218     write_xz(path.file, text, options)
   219   def write_xz(path: Path, text: CharSequence): Unit = write_xz(path, text, XZ.options())
   219   def write_xz(path: Path, text: CharSequence): Unit = write_xz(path, text, XZ.options())
   220 
   220 
   221   def write_backup(path: Path, text: CharSequence)
   221   def write_backup(path: Path, text: CharSequence)
   222   {
   222   {
   223     mv(path, path.backup)
   223     if (path.is_file) mv(path, path.backup)
   224     write(path, text)
   224     write(path, text)
   225   }
   225   }
   226 
   226 
   227   def write_backup2(path: Path, text: CharSequence)
   227   def write_backup2(path: Path, text: CharSequence)
   228   {
   228   {
   229     mv(path, path.backup2)
   229     if (path.is_file) mv(path, path.backup2)
   230     write(path, text)
   230     write(path, text)
   231   }
   231   }
   232 
   232 
   233 
   233 
   234   /* append */
   234   /* append */