/** * * @param name the file name - muse be an instance of {@link AbstractFileName} * @param fs the file system * @throws ClassCastException if {@code name} is not an instance of {@link AbstractFileName} */ protected AbstractFileObject(final AbstractFileName name, final AFS fs) { this.fileName = name; this.fs = fs; monitorLock = fs.hasCapability(Capability.PER_FILE_THREAD_LOCKING) ? this : fs; fs.fileObjectHanded(this); }
if (!fs.hasCapability(Capability.RANDOM_ACCESS_READ)) { throw new FileSystemException("vfs.provider/random-access-read-not-supported.error"); if (!fs.hasCapability(Capability.RANDOM_ACCESS_WRITE)) { throw new FileSystemException("vfs.provider/random-access-write-not-supported.error");
if (!fs.hasCapability(Capability.RANDOM_ACCESS_READ)) { throw new FileSystemException("vfs.provider/random-access-read-not-supported.error"); if (!fs.hasCapability(Capability.RANDOM_ACCESS_WRITE)) { throw new FileSystemException("vfs.provider/random-access-write-not-supported.error");
if (!fileSystem.hasCapability(Capability.RANDOM_ACCESS_READ)) { throw new FileSystemException("vfs.provider/random-access-read-not-supported.error"); if (!fileSystem.hasCapability(Capability.RANDOM_ACCESS_WRITE)) { throw new FileSystemException("vfs.provider/random-access-write-not-supported.error");
if (bAppend && !fs.hasCapability(Capability.APPEND_CONTENT)) { throw new FileSystemException("vfs.provider/write-append-not-supported.error", fileName);
if (!fs.hasCapability(Capability.RANDOM_ACCESS_READ)) if (!fs.hasCapability(Capability.RANDOM_ACCESS_WRITE))
if (bAppend && !fs.hasCapability(Capability.APPEND_CONTENT)) { throw new FileSystemException("vfs.provider/write-append-not-supported.error", fileName);
if (bAppend && !fileSystem.hasCapability(Capability.APPEND_CONTENT)) { throw new FileSystemException("vfs.provider/write-append-not-supported.error", fileName);
synchronized (fs) { if (!fs.hasCapability(Capability.LIST_CHILDREN)) { throw new FileNotFolderException(fileName);
synchronized (fileSystem) { if (!fileSystem.hasCapability(Capability.LIST_CHILDREN)) { throw new FileNotFolderException(fileName);
if (bAppend && !fs.hasCapability(Capability.APPEND_CONTENT))
synchronized (monitorLock) { if (!fs.hasCapability(Capability.LIST_CHILDREN)) { throw new FileNotFolderException(fileName);
if (!fs.hasCapability(Capability.LIST_CHILDREN))
|| destFile.getType().hasChildren() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER)) && fs.hasCapability(Capability.GET_LAST_MODIFIED))
|| destFile.getType().hasChildren() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER)) && fs.hasCapability(Capability.GET_LAST_MODIFIED)) { destFile.getContent().setLastModifiedTime(this.getContent().getLastModifiedTime());
|| destFile.getType().hasChildren() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER)) && fs.hasCapability(Capability.GET_LAST_MODIFIED)) { destFile.getContent().setLastModifiedTime(this.getContent().getLastModifiedTime());
|| destFile.getType().hasChildren() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER)) && fileSystem.hasCapability(Capability.GET_LAST_MODIFIED)) { destFile.getContent().setLastModifiedTime(this.getContent().getLastModifiedTime());