/** Finds a root for given file system. It also counts with * redefined method findResourceOn. * * @param fs the filesystem to seach on * @return the root on the fs */ private FileObject root(FileSystem fs) { return getMultiFileSystem().findResourceOn(fs, ""); // NOI18N }
private FileObject findLeader(FileSystem[] fs, String path) { MultiFileSystem mfs = getMultiFileSystem(); Number maxWeight = 0; FileObject _leader = null; FileSystem writable = mfs.writableLayer(path); for (FileSystem f : fs) { if (f == null) { continue; } FileObject fo = mfs.findResourceOn(f, path); if (fo != null) { Number weight = weightOf(fo, writable); if (_leader == null || weight.doubleValue() > maxWeight.doubleValue()) { _leader = fo; maxWeight = weight; } } } return _leader; }
/** Creates a file object that will mask the given file. * @param fs filesystem to work on * @param res resource name of the file * @exception IOException if it fails */ void maskFile(FileSystem fs, String res) throws IOException { FileObject where = findResourceOn(fs, fs.getRoot().getPath()); FileUtil.createData(where, res + MASK); }
FileObject fo = getMultiFileSystem().findResourceOn(systems[i], path);
/** Deletes a file object that will mask the given file. * @param fs filesystem to work on * @param res resource name of the file * @exception IOException if it fails */ void unmaskFile(FileSystem fs, String res) throws IOException { FileObject fo = findResourceOn(fs, res + MASK); if (fo != null) { FileLock lock = fo.lock(); try { fo.delete(lock); } finally { lock.releaseLock(); } } }
FileObject fo = mfs.findResourceOn(arr[i], name);
FileObject fo = getMultiFileSystem().findResourceOn(fs, path); Object oldValue = null; String attrToSet = attrName;
FileObject fo = getMultiFileSystem().findResourceOn(systems[i], path);
/** Finds a root for given file system. It also counts with * redefined method findResourceOn. * * @param fs the filesystem to seach on * @return the root on the fs */ private FileObject root (FileSystem fs) { return getMultiFileSystem ().findResourceOn (fs, ""); // NOI18N }
/** Finds a root for given file system. It also counts with * redefined method findResourceOn. * * @param fs the filesystem to seach on * @return the root on the fs */ private FileObject root (FileSystem fs) { return getMultiFileSystem ().findResourceOn (fs, ""); // NOI18N }
private FileObject findLeader (FileSystem[] fs, String path) { MultiFileSystem mfs = getMultiFileSystem (); for (int i = 0; i < fs.length; i++) { FileObject fo = mfs.findResourceOn (fs[i], path); if (fo != null) { return fo; } } return null; }
private FileObject findLeader (FileSystem[] fs, String path) { MultiFileSystem mfs = getMultiFileSystem (); for (int i = 0; i < fs.length; i++) { FileObject fo = mfs.findResourceOn (fs[i], path); if (fo != null) { return fo; } } return null; }
/** Creates a file object that will mask the given file. * @param fs filesystem to work on * @param res resource name of the file * @exception IOException if it fails */ void maskFile (FileSystem fs, String res) throws IOException { FileObject where = findResourceOn (fs,fs.getRoot().getPath ()); FileUtil.createData (where, res + MASK); }
/** Creates a file object that will mask the given file. * @param fs filesystem to work on * @param res resource name of the file * @exception IOException if it fails */ void maskFile (FileSystem fs, String res) throws IOException { FileObject where = findResourceOn (fs,fs.getRoot().getPath ()); FileUtil.createData (where, res + MASK); }
FileObject fo = getMultiFileSystem ().findResourceOn (systems[i],path); if (fo != null) { Enumeration e = fo.getAttributes ();
/** Deletes a file object that will mask the given file. * @param fs filesystem to work on * @param res resource name of the file * @exception IOException if it fails */ void unmaskFile (FileSystem fs, String res) throws IOException { FileObject fo = findResourceOn (fs,res + MASK); if (fo != null) { FileLock lock = fo.lock (); try { fo.delete (lock); } finally { lock.releaseLock (); } } }
/** Deletes a file object that will mask the given file. * @param fs filesystem to work on * @param res resource name of the file * @exception IOException if it fails */ void unmaskFile (FileSystem fs, String res) throws IOException { FileObject fo = findResourceOn (fs,res + MASK); if (fo != null) { FileLock lock = fo.lock (); try { fo.delete (lock); } finally { lock.releaseLock (); } } }
FileObject fo = mfs.findResourceOn (arr[i], name); if (fo != null) { del.add (fo);
FileObject fo = getMultiFileSystem ().findResourceOn (fs,path); Object oldValue = null; String attrToSet = attrName;
FileObject fo = getMultiFileSystem ().findResourceOn (fs,path); Object oldValue = null; String attrToSet = attrName;