/** * Notify the parent of a change to its children, when a child is created or deleted. * * @param childName The name of the child. * @param newType The type of the child. * @throws Exception if an error occurs. */ private void notifyParent(final FileName childName, final FileType newType) throws Exception { if (parent == null) { final FileName parentName = fileName.getParent(); if (parentName != null) { // Locate the parent, if it is cached parent = fs.getFileFromCache(parentName); } } if (parent != null) { FileObjectUtils.getAbstractFileObject(parent).childrenChanged(childName, newType); } }
/** * Notify the parent of a change to its children, when a child is created or deleted. * * @param childName The name of the child. * @param newType The type of the child. * @throws Exception if an error occurs. */ private void notifyParent(final FileName childName, final FileType newType) throws Exception { if (parent == null) { final FileName parentName = fileName.getParent(); if (parentName != null) { // Locate the parent, if it is cached parent = fs.getFileFromCache(parentName); } } if (parent != null) { FileObjectUtils.getAbstractFileObject(parent).childrenChanged(childName, newType); } }
/** * Notify the parent of a change to its children, when a child is created or deleted. * * @param childName The name of the child. * @param newType The type of the child. * @throws Exception if an error occurs. */ private void notifyParent(final FileName childName, final FileType newType) throws Exception { if (parent == null) { final FileName parentName = fileName.getParent(); if (parentName != null) { // Locate the parent, if it is cached parent = fileSystem.getFileFromCache(parentName); } } if (parent != null) { FileObjectUtils.getAbstractFileObject(parent).childrenChanged(childName, newType); } }
/** * Notify the parent of a change to its children, when a child is created * or deleted. * @param childName The name of the child. * @param newType The type of the child. * @throws Exception if an error occurs. */ private void notifyParent(final FileName childName, final FileType newType) throws Exception { if (parent == null) { final FileName parentName = fileName.getParent(); if (parentName != null) { // Locate the parent, if it is cached parent = fs.getFileFromCache(parentName); } } if (parent != null) { FileObjectUtils.getAbstractFileObject(parent).childrenChanged(childName, newType); } }
parent = fs.resolveFile(fileName.getParent());
/** * Returns the parent of the file. * * @return the parent FileObject. * @throws FileSystemException if an error occurs. */ @Override public FileObject getParent() throws FileSystemException { if (this.compareTo(fs.getRoot()) == 0) // equals is not implemented :-/ { if (fs.getParentLayer() == null) { // Root file has no parent return null; } // Return the parent of the parent layer return fs.getParentLayer().getParent(); } synchronized (fs) { // Locate the parent of this file if (parent == null) { final FileName name = fileName.getParent(); if (name == null) { return null; } parent = fs.resolveFile(name); } return parent; } }
/** * Returns the parent of the file. * * @return the parent FileObject. * @throws FileSystemException if an error occurs. */ @Override public FileObject getParent() throws FileSystemException { if (this.compareTo(fileSystem.getRoot()) == 0) // equals is not implemented :-/ { if (fileSystem.getParentLayer() == null) { // Root file has no parent return null; } // Return the parent of the parent layer return fileSystem.getParentLayer().getParent(); } synchronized (fileSystem) { // Locate the parent of this file if (parent == null) { final FileName name = fileName.getParent(); if (name == null) { return null; } parent = fileSystem.resolveFile(name); } return parent; } }
FileName name = fileName.getParent(); if (name == null) { return null;
for (AbstractFileName parentName = (AbstractFileName) childName.getParent(); !done && parentName != null; childName = parentName, parentName = (AbstractFileName) parentName .getParent()) { DelegateFileObject file = (DelegateFileObject) getFileFromCache(parentName); if (file == null) {
for (AbstractFileName parentName = (AbstractFileName) childName.getParent(); !done && parentName != null; childName = parentName, parentName = (AbstractFileName) parentName .getParent()) { DelegateFileObject file = (DelegateFileObject) getFileFromCache(parentName); if (file == null) {
for (AbstractFileName parentName = (AbstractFileName) childName.getParent(); !done && parentName != null; childName = parentName, parentName = (AbstractFileName) parentName .getParent()) { DelegateFileObject file = (DelegateFileObject) getFileFromCache(parentName); if (file == null) {
for (AbstractFileName parentName = (AbstractFileName) childName.getParent(); !done && parentName != null; childName = parentName, parentName = (AbstractFileName) parentName.getParent())