public Object getAttribute(String attrName) { return getAttribute(attrName, getPath()); }
private Object getAttribute(FileObject fo, String attrName, String path) { Object o; FileObject previousFO = attrAskedFileObject.get(); if (previousFO == null || !sameFullName(previousFO, this)) { attrAskedFileObject.set(this); } try { if (fo instanceof MultiFileObject) { o = ((MultiFileObject) fo).getAttribute(attrName, path); } else if (fo instanceof AbstractFileObject) { o = ((AbstractFileObject) fo).getAttribute(attrName, path); } else { o = fo.getAttribute(attrName); } } finally { attrAskedFileObject.set(previousFO); } return o; }
void setAttribute(String attrName, Object value, boolean fire) throws IOException { Object oldValue = null; //FileSystem fs = getAbstractFileSystem (); //if (fs.isReadOnly()) XMLFileSystemTestHid.java:934 // throw new FSException(NbBundle.getMessage(AbstractFileObject.class, "EXC_FSisRO", fs.getDisplayName ()); // NOI18N if (fire) { oldValue = getAttribute(attrName); } getAbstractFileSystem().attr.writeAttribute(getPath(), attrName, value); if (fire && (oldValue != value) && hasAtLeastOneListeners()) { fileAttributeChanged0(new FileAttributeEvent(this, attrName, oldValue, value)); } }
public Object getAttribute(String attrName) { return getAttribute (attrName, getPath ()); }
public Object getAttribute(String attrName) { return getAttribute (attrName, getPath ()); }
private Object getAttribute (FileObject fo, String attrName, String path ) { Object o; FileObject topFO = (FileObject) attrAskedFileObject.get(); if (topFO == null) { attrAskedFileObject.set(this); } try { if (fo instanceof MultiFileObject) { o = ((MultiFileObject) fo).getAttribute (attrName, path); } else if (fo instanceof AbstractFileObject) { o = ((AbstractFileObject) fo).getAttribute (attrName, path); } else { o = fo.getAttribute (attrName); } } finally { if (topFO == null) { attrAskedFileObject.set(null); } } if (o != null) { lastAttrCacheFile = fo; lastAttrCacheName = attrName; } return o; }
private Object getAttribute (FileObject fo, String attrName, String path ) { Object o; FileObject topFO = (FileObject) attrAskedFileObject.get(); if (topFO == null) { attrAskedFileObject.set(this); } try { if (fo instanceof MultiFileObject) { o = ((MultiFileObject) fo).getAttribute (attrName, path); } else if (fo instanceof AbstractFileObject) { o = ((AbstractFileObject) fo).getAttribute (attrName, path); } else { o = fo.getAttribute (attrName); } } finally { if (topFO == null) { attrAskedFileObject.set(null); } } if (o != null) { lastAttrCacheFile = fo; lastAttrCacheName = attrName; } return o; }
void setAttribute (String attrName, Object value, boolean fire) throws IOException { Object oldValue = null; //FileSystem fs = getAbstractFileSystem (); //if (fs.isReadOnly()) // FSException.io("EXC_FSisRO", fs.getDisplayName ()); // NOI18N if (fire) oldValue = getAttribute (attrName); getAbstractFileSystem ().attr.writeAttribute (getPath (), attrName, value); if (fire && oldValue != value && hasAtLeastOneListeners () ) fileAttributeChanged0 (new FileAttributeEvent (this,attrName,oldValue,value)); }
void setAttribute (String attrName, Object value, boolean fire) throws IOException { Object oldValue = null; //FileSystem fs = getAbstractFileSystem (); //if (fs.isReadOnly()) // FSException.io("EXC_FSisRO", fs.getDisplayName ()); // NOI18N if (fire) oldValue = getAttribute (attrName); getAbstractFileSystem ().attr.writeAttribute (getPath (), attrName, value); if (fire && oldValue != value && hasAtLeastOneListeners () ) fileAttributeChanged0 (new FileAttributeEvent (this,attrName,oldValue,value)); }