File fFile = findFileInRepository(fo); return toURL(fFile, fo); } catch (MalformedURLException mfx) { assert false : mfx;
public FileObject[] getFileObjects(URL url) { String prot = url.getProtocol(); if (prot.equals(FileURL.PROTOCOL)) { //// NOI18N FileObject retVal = FileURL.decodeURL(url); return (retVal == null) ? null : new FileObject[] { retVal }; } if (prot.equals("jar")) { //// NOI18N return getFileObjectsForJarProtocol(url); } if (prot.equals("file")) { //// NOI18N File f = toFile(url); if (f != null) { FileObject[] foRes = findFileObjectsInRepository(f); if ((foRes != null) && (foRes.length > 0)) { return foRes; } } } return null; }
File fFile = findFileInRepository(fo); if (fFile != null) { try { return toURL(fFile, fo); } catch (MalformedURLException mfx) { assert false : mfx;
File fFile = findFileInRepository(fo); if (fFile != null) { try { return toURL(fFile, fo); } catch (MalformedURLException mfx) { assert false : mfx;
String rootName = null; FileObject fsRoot = fs.getRoot (); File root = findFileInRepository (fsRoot); if (root == null) { Object rootPath = fsRoot.getAttribute("FileSystem.rootPath");//NOI18N String res = fileName.substring(rootName.length()).replace(File.separatorChar, '/'); FileObject fo = fs.findResource(res); File file2Fo = (fo != null)? findFileInRepository(fo) : null; if (fo != null && file2Fo != null && f.equals(file2Fo)) { if (fo.getClass().toString().indexOf ("org.netbeans.modules.masterfs.MasterFileObject") != -1) {//NOI18N
String rootName = null; FileObject fsRoot = fs.getRoot (); File root = findFileInRepository (fsRoot); if (root == null) { Object rootPath = fsRoot.getAttribute("FileSystem.rootPath");//NOI18N String res = fileName.substring(rootName.length()).replace(File.separatorChar, '/'); FileObject fo = fs.findResource(res); File file2Fo = (fo != null)? findFileInRepository(fo) : null; if (fo != null && file2Fo != null && f.equals(file2Fo)) { if (fo.getClass().toString().indexOf ("org.netbeans.modules.masterfs.MasterFileObject") != -1) {//NOI18N
public FileObject[] getFileObjects(URL url) { String prot = url.getProtocol(); if (prot.equals("nbfs")) { //// NOI18N FileObject retVal = FileURL.decodeURL(url); return (retVal == null) ? null : new FileObject[] {retVal}; } if (prot.equals("jar")) { //// NOI18N return getFileObjectsForJarProtocol(url); } if (prot.equals("file")) { //// NOI18N File f = toFile(url); if (f != null) { FileObject[] foRes = findFileObjectsInRepository(f); if (foRes != null && foRes.length > 0) { return foRes; } } } return null; }
public FileObject[] getFileObjects(URL url) { String prot = url.getProtocol(); if (prot.equals("nbfs")) { //// NOI18N FileObject retVal = FileURL.decodeURL(url); return (retVal == null) ? null : new FileObject[] {retVal}; } if (prot.equals("jar")) { //// NOI18N return getFileObjectsForJarProtocol(url); } if (prot.equals("file")) { //// NOI18N File f = toFile(url); if (f != null) { FileObject[] foRes = findFileObjectsInRepository(f); if (foRes != null && foRes.length > 0) { return foRes; } } } return null; }
private static FileObject[] getFileObjectsForJarProtocol(URL url) { FileObject retVal = null; JarURLParser jarUrlParser = new JarURLParser(url); File file = jarUrlParser.getJarFile(); String entryName = jarUrlParser.getEntryName(); if (file != null ) { JarFileSystem fs = findJarFileSystem(file); if (fs != null) { if (entryName == null) entryName = ""; // #39190: root of JAR retVal = fs.findResource(entryName); } } return (retVal == null) ? null : new FileObject[] {retVal}; }
private static FileObject[] getFileObjectsForJarProtocol(URL url) { FileObject retVal = null; JarURLParser jarUrlParser = new JarURLParser(url); File file = jarUrlParser.getJarFile(); String entryName = jarUrlParser.getEntryName(); if (file != null ) { JarFileSystem fs = findJarFileSystem(file); if (fs != null) { if (entryName == null) entryName = ""; // #39190: root of JAR retVal = fs.findResource(entryName); } } return (retVal == null) ? null : new FileObject[] {retVal}; }
public URL getURL(FileObject fo, int type) { return getURLBasicImpl(fo, type); }
public URL getURL(FileObject fo, int type) { return getURLBasicImpl(fo, type); }
/** this method is expeceted to be invoked to create instance of URLMapper, * because of method invocation (attr name="instanceCreate" * methodvalue="org.openide.filesystems.URLMapper.getDefault")*/ private static URLMapper getDefault () { synchronized (URLMapper.class) { if (defMapper == null) defMapper = new DefaultURLMapper (); return defMapper; } }
/** this method is expeceted to be invoked to create instance of URLMapper, * because of method invocation (attr name="instanceCreate" * methodvalue="org.openide.filesystems.URLMapper.getDefault")*/ private static URLMapper getDefault () { synchronized (URLMapper.class) { if (defMapper == null) defMapper = new DefaultURLMapper (); return defMapper; } }
String rootName = null; FileObject fsRoot = fs.getRoot(); File root = findFileInRepository(fsRoot); String res = fileName.substring(rootName.length()).replace(File.separatorChar, '/'); FileObject fo = fs.findResource(res); File file2Fo = (fo != null) ? findFileInRepository(fo) : null;
private static FileObject[] getFileObjectsForJarProtocol(URL url) { FileObject retVal = null; JarURLParser jarUrlParser = new JarURLParser(url); File file = jarUrlParser.getJarFile(); String entryName = jarUrlParser.getEntryName(); if (file != null) { JarFileSystem fs = findJarFileSystem(file); if (fs != null) { if (entryName == null) { entryName = ""; // #39190: root of JAR } retVal = fs.findResource(entryName); } } return (retVal == null) ? null : new FileObject[] { retVal }; }