public final void refresh(boolean expected) { if (!isInitialized() && isFolder()) { return; } Enumeration<FileObject> en = delegates(); while (en.hasMoreElements()) { FileObject fo = en.nextElement(); fo.refresh(expected); } super.refresh(expected); }
/** Update all existing subobjects. */ void updateAll() { FileSystem mfs = getMultiFileSystem(); try { mfs.beginAtomicAction(); // enumeration of all existing objects Enumeration<AbstractFolder> en = existingSubFiles(true); while (en.hasMoreElements()) { MultiFileObject mfo = (MultiFileObject) en.nextElement(); if (mfo.isFolder() && !mfo.isInitialized()) { continue; } mfo.freeAttribCache(); mfo.superRefresh(true); } } finally { mfs.finishAtomicAction(); } }
/** This method was added to achieve firing events that attributes * were changed after setDelegates. Events are not fired reliable but this solution was * choosed because of performance reasons. Attributes name is set to null - what means * that one of attributes was probably changed. */ void updateAllAfterSetDelegates(FileSystem[] oldFileSystems) { try { getMultiFileSystem().beginAtomicAction(); FileSystem[] fileSystems = getMultiFileSystem().getDelegates(); Enumeration<AbstractFolder> en = existingSubFiles(true); while (en.hasMoreElements()) { MultiFileObject mfo = (MultiFileObject) en.nextElement(); if (mfo.isFolder() && !mfo.isInitialized()) { continue; } if (mfo.hasListeners()) { String path = mfo.getPath(); FileObject oldLeader = findLeader(oldFileSystems, path); FileObject newLeader = findLeader(fileSystems, path); if ((oldLeader != null) && (newLeader != null) && !oldLeader.equals(newLeader)) { mfo.fileAttributeChanged0(new FileAttributeEvent(mfo, null, null, null)); } } mfo.freeAttribCache(); mfo.refresh(true); } } finally { getMultiFileSystem().finishAtomicAction(); } }
if (!isFolder()) { throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FoNotFolder", n, getPath(), fs.getDisplayName()));
if (!isFolder()) { throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_FoNotFolder", name, getPath(), fs.getDisplayName()));
FileSystem writable = getMultiFileSystem().writableLayer(path); boolean revealEntries = isFolder() && "revealEntries".equals(attrName) && writable != null && !writable.isReadOnly(); //NOI18N
public final void refresh(boolean expected) { if (!isInitialized () && isFolder ()) return; Enumeration en = delegates (); while (en.hasMoreElements()) { FileObject fo = (FileObject)en.nextElement(); fo.refresh (expected); } super.refresh (expected); }
public final void refresh(boolean expected) { if (!isInitialized () && isFolder ()) return; Enumeration en = delegates (); while (en.hasMoreElements()) { FileObject fo = (FileObject)en.nextElement(); fo.refresh (expected); } super.refresh (expected); }
/** Update all existing subobjects. */ void updateAll () { FileSystem mfs = getMultiFileSystem (); try { mfs.beginAtomicAction (); // enumeration of all existing objects Enumeration en = existingSubFiles(true); while (en.hasMoreElements()) { MultiFileObject mfo = (MultiFileObject)en.nextElement(); if (mfo.isFolder() && !mfo.isInitialized ()) continue; mfo.freeLastAttrCache (); mfo.superRefresh(true); } } finally { mfs.finishAtomicAction (); } }
/** Update all existing subobjects. */ void updateAll () { FileSystem mfs = getMultiFileSystem (); try { mfs.beginAtomicAction (); // enumeration of all existing objects Enumeration en = existingSubFiles(true); while (en.hasMoreElements()) { MultiFileObject mfo = (MultiFileObject)en.nextElement(); if (mfo.isFolder() && !mfo.isInitialized ()) continue; mfo.freeLastAttrCache (); mfo.superRefresh(true); } } finally { mfs.finishAtomicAction (); } }
while (en.hasMoreElements()) { MultiFileObject mfo = (MultiFileObject)en.nextElement(); if (mfo.isFolder() && !mfo.isInitialized ()) continue; if (mfo.hasListeners()) {
while (en.hasMoreElements()) { MultiFileObject mfo = (MultiFileObject)en.nextElement(); if (mfo.isFolder() && !mfo.isInitialized ()) continue; if (mfo.hasListeners()) {
if (! isFolder()) { FSException.io ("EXC_FoNotFolder", n, getPath(), fs.getDisplayName ()); // NOI18N
if (! isFolder()) { FSException.io ("EXC_FoNotFolder", n, getPath(), fs.getDisplayName ()); // NOI18N
if (! isFolder()) { FSException.io ("EXC_FoNotFolder", name, getPath(), fs.getDisplayName ()); // NOI18N
if (! isFolder()) { FSException.io ("EXC_FoNotFolder", name, getPath(), fs.getDisplayName ()); // NOI18N