/** * Create the lock file if it doesn't already exist and lock it with * an exclusive lock. * * @param lockFile the name of the lock file * @return the FileLock object representing the lock file * @throws IOException if the file has already been locked or an I/O error * occurs. */ public static LockFile createLockFile(File lockFile) throws IOException { return new LockFile(lockFile); }