private void deleteFile(String name) throws IOException { OutputStream os = null; this.info.lock(name); try { //added because of mutual exclusion of streams (waits a while until stream is closed) os = this.info.outputStream(name); os.close(); os = null; this.change.delete(name); } finally { if (os != null) { os.close(); } this.info.unlock(name); } }
/** Unlocks the file. Notifies the underlaying impl. */ void unlock(FileLock fLock) { FileLock currentLock = null; synchronized(this) { if (lock != null) { currentLock = lock.get(); } if (currentLock == fLock) { putLastModified(null); // clear my lock lock = null; } } getAbstractFileSystem().info.unlock(getPath()); if (isValid()) { lastModified(); } }
/** Unlocks the file. Notifies the underlaying impl. */ synchronized void unlock (FileLock fLock) { FileLock currentLock = null; if (lock != null) { currentLock = (FileLock)lock.get(); } if (currentLock == fLock) { getAbstractFileSystem ().info.unlock (getPath ()); lastModified = null; if (isValid ()) { lastModified (); } // clear my lock lock = null; } }
/** Unlocks the file. Notifies the underlaying impl. */ synchronized void unlock (FileLock fLock) { FileLock currentLock = null; if (lock != null) { currentLock = (FileLock)lock.get(); } if (currentLock == fLock) { getAbstractFileSystem ().info.unlock (getPath ()); lastModified = null; if (isValid ()) { lastModified (); } // clear my lock lock = null; } }