public DelegateFileObject(final FileName name, final AbstractFileSystem fileSystem, final FileObject file) throws FileSystemException { super(name, fileSystem); this.file = file; if (file != null) { file.getFileSystem().addListener(file, this); } }
/** * Attaches or detaches the target file. */ public void setFile(final FileObject file) throws Exception { final FileType oldType = doGetType(); if (file != null) { file.getFileSystem().addListener(file, this); } this.file = file; maybeTypeChanged(oldType); }
file.getFileSystem().addListener(file, this.listener);
child.getFileSystem().addListener(child, this.fm.getFileListener());