Class FileUtils

java.lang.Object
com.gigaspaces.internal.utils.FileUtils

public class FileUtils extends Object
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • renameFile

      public static void renameFile(Path source, Path target) throws IOException
      Throws:
      IOException
    • renameFile

      public static void renameFile(Path source, Path target, int maxAttempts) throws IOException
      Throws:
      IOException
    • renameFileWithCopyFallback

      public static void renameFileWithCopyFallback(Path source, Path target) throws IOException
      Fallback method that copies the source to target, then deletes source
      Throws:
      IOException
    • deleteDirectory

      public static void deleteDirectory(File dir) throws IOException
      Improved directory deletion with better Windows compatibility
      Throws:
      IOException
    • deleteDirectory

      public static void deleteDirectory(File dir, int maxAttempts) throws IOException
      Throws:
      IOException
    • deleteFileRecursive

      public static boolean deleteFileRecursive(File file)
      Improved recursive file deletion
    • copyDirectoryRecursively

      public static void copyDirectoryRecursively(Path source, Path target) throws IOException
      Recursively copy a directory
      Throws:
      IOException