code: private void unlockSourceAndCopy(File sourceFile, File copyFile) {
      ReadWriteLock sourceLock = sourceFile.contentLock();
      if (sourceLock != null) {
        sourceLock.readLock().unlock();
      }
      ReadWriteLock copyLock = copyFile.contentLock();
      if (copyLock != null) {
        copyLock.writeLock().unlock();
      }
      sourceFile.closed();
    }
docs: Unlocks source and copy files after copying content. Also closes the source file so its content
  can be deleted if it was deleted.