Code example for FileLock

Methods: release

0
        } 
         
        // release the lock.. 
        if (lock != null) {
            try { 
                lock.release();
            } catch (Throwable ignore) {
            } 
            lock = null;
        } 
        closeReadFile(); 
         
        if( deleteOnUnlock ) {
            file.delete();
        } 
    } 
 
    private void closeReadFile() { 
        // close the file. 
        if (readFile != null) {
Experience pair programming with AI  Get Codota for Java