/** Fired when a file is changed. * @param fe the event describing context where action has taken place */ public void fileChanged(FileEvent fe) { FileObject changedFile = this; if (fe.getSource().equals(leader) && hasAtLeastOneListeners() && !fe.firedFrom(markAtomicAction)) { /**There should not dissapear information about source and changed file*/ if (!fe.getFile().equals(fe.getSource())) { changedFile = getFileObject(fe.getFile().getName(), fe.getFile().getExt()); } /**fileChanged1 - should not fire event for this.getParent (). * I think that already bottom layer forked event.*/ /** [PENDING] fix of #16926, #16895. But there should be investigated * why this MFO doesn`t know about child ?*/ if (changedFile != null) { fileChanged1(new FileEvent(this, changedFile, fe.getTime())); } } }
if (!hasAtLeastOneListeners() || (leader == null)) { return;
void handleDelete(FileLock lock) throws IOException { if (parent == null) { throw new FSException(NbBundle.getMessage(MultiFileObject.class, "EXC_CannotDeleteRoot", getMultiFileSystem().getDisplayName())); } MultiFileSystem fs = getMultiFileSystem(); try { getFileSystem().beginAtomicAction(); synchronized (parent) { String fullName = getPath(); FileSystem single = fs.createWritableOn(fullName); if (needsMask(lock, true)) { getMultiFileSystem().maskFile(single, fullName); updateFoldersLock(getParent()); } String n = name; validFlag = false; /** [PENDING] expected rename of some refresh method */ //parent.internalRefresh (null, n, true, false, null); parent.refresh(null, n, true, false); if (hasAtLeastOneListeners()) { fileDeleted0(new FileEvent(this)); } } } finally { getFileSystem().finishAtomicAction(); } }
if (fire && (oldValue != value) && hasAtLeastOneListeners()) { fileAttributeChanged0(new FileAttributeEvent(this, attrName, oldValue, value));
if (hasAtLeastOneListeners()) { fileRenamed0(new FileRenameEvent(this, on, oe));
/** Fired when a file is changed. * @param fe the event describing context where action has taken place */ public void fileChanged(FileEvent fe) { FileObject changedFile = this; if (fe.getSource().equals(leader) && hasAtLeastOneListeners() && !fe.firedFrom(markAtomicAction)) { /**There should not dissapear information about source and changed file*/ if (!fe.getFile().equals(fe.getSource())) changedFile = getFileObject(fe.getFile().getName(), fe.getFile().getExt()); /**fileChanged1 - should not fire event for this.getParent (). * I think that already bottom layer forked event.*/ /** [PENDING] fix of #16926, #16895. But there should be investigated * why this MFO doesn`t know about child ?*/ if (changedFile != null) fileChanged1(new FileEvent(this,changedFile, fe.getTime())); } }
/** Fired when a file is changed. * @param fe the event describing context where action has taken place */ public void fileChanged(FileEvent fe) { FileObject changedFile = this; if (fe.getSource().equals(leader) && hasAtLeastOneListeners() && !fe.firedFrom(markAtomicAction)) { /**There should not dissapear information about source and changed file*/ if (!fe.getFile().equals(fe.getSource())) changedFile = getFileObject(fe.getFile().getName(), fe.getFile().getExt()); /**fileChanged1 - should not fire event for this.getParent (). * I think that already bottom layer forked event.*/ /** [PENDING] fix of #16926, #16895. But there should be investigated * why this MFO doesn`t know about child ?*/ if (changedFile != null) fileChanged1(new FileEvent(this,changedFile, fe.getTime())); } }
/** Fired when a file attribute is changed. * @param fe the event describing context where action has taken place, * the name of attribute and the old and new values. */ public void fileAttributeChanged(FileAttributeEvent fe) { // [PENDING] this is not at all sufficient to notify every change in attributes. // One, parent dirs of front filesystems can now hold attributes for missing // files. Two, non-leader files can have attributes too which are merged in. // In principle all files/folders whose path is a prefix of this path on all // contained filesystems should be listened to for attribute change events. if (!hasAtLeastOneListeners () || leader == null) return; /** If change is not fired from leader then leader may mask this attribute * and then event should not be fired */ if (!fe.getFile().equals(leader) && fe.getName() != null && leader.getAttribute (fe.getName()) != null) return; /** If change is not fired from leader then another delegate may mask this attribute * and then event should not be fired. */ if (!fe.getFile().equals(leader) && fe.getNewValue() != null && fe.getName() != null && !fe.getNewValue().equals (getAttribute (fe.getName()))) return; fileAttributeChanged0 (new FileAttributeEvent ( this, fe.getName(), fe.getOldValue(), fe.getNewValue())); }
/** Fired when a file attribute is changed. * @param fe the event describing context where action has taken place, * the name of attribute and the old and new values. */ public void fileAttributeChanged(FileAttributeEvent fe) { // [PENDING] this is not at all sufficient to notify every change in attributes. // One, parent dirs of front filesystems can now hold attributes for missing // files. Two, non-leader files can have attributes too which are merged in. // In principle all files/folders whose path is a prefix of this path on all // contained filesystems should be listened to for attribute change events. if (!hasAtLeastOneListeners () || leader == null) return; /** If change is not fired from leader then leader may mask this attribute * and then event should not be fired */ if (!fe.getFile().equals(leader) && fe.getName() != null && leader.getAttribute (fe.getName()) != null) return; /** If change is not fired from leader then another delegate may mask this attribute * and then event should not be fired. */ if (!fe.getFile().equals(leader) && fe.getNewValue() != null && fe.getName() != null && !fe.getNewValue().equals (getAttribute (fe.getName()))) return; fileAttributeChanged0 (new FileAttributeEvent ( this, fe.getName(), fe.getOldValue(), fe.getNewValue())); }
if (fire && oldValue != value && hasAtLeastOneListeners () ) fileAttributeChanged0 (new FileAttributeEvent (this,attrName,oldValue,value));
if (fire && oldValue != value && hasAtLeastOneListeners () ) fileAttributeChanged0 (new FileAttributeEvent (this,attrName,oldValue,value));
void handleDelete (FileLock lock) throws IOException { if (parent == null) { FSException.io ( "EXC_CannotDeleteRoot", getMultiFileSystem ().getDisplayName () // NOI18N ); } MultiFileSystem fs = getMultiFileSystem (); try { getFileSystem ().beginAtomicAction (); synchronized (parent) { String fullName = getPath (); FileSystem single = fs.createWritableOn (fullName); if (needsMask (lock, true)) { getMultiFileSystem ().maskFile (single, fullName); updateFoldersLock (getParent ()); } String n = name; validFlag = false; /** [PENDING] expected rename of some refresh method */ //parent.internalRefresh (null, n, true, false, null); parent.refresh (null, n, true, false); if (hasAtLeastOneListeners ()) { fileDeleted0 (new FileEvent(this)); } } } finally { getFileSystem ().finishAtomicAction (); } }
void handleDelete (FileLock lock) throws IOException { if (parent == null) { FSException.io ( "EXC_CannotDeleteRoot", getMultiFileSystem ().getDisplayName () // NOI18N ); } MultiFileSystem fs = getMultiFileSystem (); try { getFileSystem ().beginAtomicAction (); synchronized (parent) { String fullName = getPath (); FileSystem single = fs.createWritableOn (fullName); if (needsMask (lock, true)) { getMultiFileSystem ().maskFile (single, fullName); updateFoldersLock (getParent ()); } String n = name; validFlag = false; /** [PENDING] expected rename of some refresh method */ //parent.internalRefresh (null, n, true, false, null); parent.refresh (null, n, true, false); if (hasAtLeastOneListeners ()) { fileDeleted0 (new FileEvent(this)); } } } finally { getFileSystem ().finishAtomicAction (); } }
if (hasAtLeastOneListeners ()) { fileRenamed0 (new FileRenameEvent(this, on, oe));
if (hasAtLeastOneListeners ()) { fileRenamed0 (new FileRenameEvent(this, on, oe));