/** Finds the right file. */ public Object readResolve () { Repository rep = ExternalUtil.getRepository (); FileSystem fs = rep.findFileSystem (fsName); FileObject fo = null; if (fs != null) { // scan desired system fo = fs.findResource (fileName); } if (fo == null) { // create invalid file instead return new Invalid (fsName, fileName); } return fo; }
/** Constructor. Takes reference to file system this file belongs to. * * @param fs the file system * @param parent the parent object (folder) * @param name name of the object (e.g. <code>filename.ext</code>) */ public MultiFileObject(MultiFileSystem fs, MultiFileObject parent, String name) { super (fs, parent, name); weakL = (MfoWeakListener)org.openide.util.WeakListeners.create (MfoWeakListener.class, FileChangeListener.class, this, null); update (); if (leader == null) { leader = new AbstractFileObject.Invalid (name); validFlag = false; } }
/** Finds the right file. */ public Object readResolve () { Repository rep = ExternalUtil.getRepository (); FileSystem fs = rep.findFileSystem (fsName); FileObject fo = null; if (fs != null) { // scan desired system fo = fs.findResource (fileName); } if (fo == null) { // create invalid file instead return new Invalid (fsName, fileName); } return fo; }
/** Constructor. Takes reference to file system this file belongs to. * * @param fs the file system * @param parent the parent object (folder) * @param name name of the object (e.g. <code>filename.ext</code>) */ public MultiFileObject(MultiFileSystem fs, MultiFileObject parent, String name) { super (fs, parent, name); weakL = (MfoWeakListener)org.openide.util.WeakListeners.create (MfoWeakListener.class, FileChangeListener.class, this, null); update (); if (leader == null) { leader = new AbstractFileObject.Invalid (name); validFlag = false; } }
/** Finds the right file. */ public Object readResolve() { Repository rep = Repository.getDefault(); @SuppressWarnings("deprecation") // FileSystem.systemName historical part of serial form FileSystem fs = rep.findFileSystem(fsName); FileObject fo = null; if (fs != null) { // scan desired system fo = fs.findResource(fileName); } if (fo == null) { // create invalid file instead return new Invalid(fsName, fileName); } return fo; } }
/** Constructor. Takes reference to file system this file belongs to. * * @param fs the file system * @param parent the parent object (folder) * @param name name of the object (e.g. <code>filename.ext</code>) */ public MultiFileObject(MultiFileSystem fs, MultiFileObject parent, String name) { super(fs, parent, name); weakL = org.openide.util.WeakListeners.create( FileObject.PriorityFileChangeListener.class, FileChangeListener.class, this, null ); update(); if (leader == null) { leader = new AbstractFileObject.Invalid(name); validFlag = false; } }