Class FileSync


  • public class FileSync
    extends Object
    • Constructor Detail

      • FileSync

        public FileSync()
    • Method Detail

      • lockFile

        public static void lockFile​(File file)
                             throws IOException
        Locks the file. This call is re-entrant. Each call on the same thread increases the hold count.
        Throws:
        IOException
      • isHeldByCurrentThread

        public static boolean isHeldByCurrentThread​(File file)
      • unlockFile

        public static void unlockFile​(File file)
                               throws IOException
        Unlocks the file. This call is re-entrant. Only when the calling thread has no more holds will the file be unlocked.
        Throws:
        IOException