java.lang.Object
io.github.tonywasher.joceanus.metis.toolkit.MetisSafeFileManager

public class MetisSafeFileManager extends Object
Safe File Create.
  • Field Details

  • Constructor Details

    • MetisSafeFileManager

      public MetisSafeFileManager(File pFileName)
      Constructor.
      Parameters:
      pFileName - the file name
  • Method Details

    • setNumBackups

      public void setNumBackups(int pNumBackups)
      Set the number of backups.
      Parameters:
      pNumBackups - the number of backups
    • commitFile

      public void commitFile() throws OceanusException
      Commit file.
      Throws:
      OceanusException - on error
    • cleanUpFile

      public void cleanUpFile()
      Cleanup file.
    • getFileToWriteTo

      public File getFileToWriteTo()
      Obtain name of temporary file to write to.
      Returns:
      the temporary name
    • getRealFile

      public File getRealFile()
      Obtain standard name.
      Returns:
      the standard name
    • clearDirectory

      public static void clearDirectory(File pDirectory)
      ClearUp directory.
      Parameters:
      pDirectory - the directory to clean