@Override public void fileDeleted(FileEvent fe) { Enumeration<? extends FileObject> en = existingFileObjects(getRoot()); while (en.hasMoreElements()) { AbstractFolder fo = (AbstractFolder) en.nextElement(); fo.validFlag = false; fo.fileDeleted0(new FileEvent(fo)); } refreshRoot(); } };
/** refreshes children recursively.*/ private void refreshExistingFileObjects() { Cache cache = getCache(); String[] empty = new String[0]; Enumeration<? extends FileObject> en = existingFileObjects(getRoot()); while (en.hasMoreElements()) { AbstractFolder fo = (AbstractFolder) en.nextElement(); assert fo != null; if (fo.isFolder() && !fo.isInitialized()) { continue; } String[] children = cache.getChildrenOf(fo.getPath()); if (children == null) { children = empty; } fo.refresh(null, null, true, true, children); } }
/******************************************************************************************************************* * * {@inheritDoc} * ******************************************************************************************************************/ @Override @Nonnull public synchronized FileSystem getFileSystem() throws IOException { if (fileSystem == null) { fileSystem = new JarFileSystem(new File(zipFilePath)); final FileObject rootFolder = fileSystem.getRoot(); if (rootFolder == null) { throw new FileNotFoundException(zipFilePath); } } return fileSystem; } }
/******************************************************************************************************************* * * {@inheritDoc} * ******************************************************************************************************************/ @Override @Nonnull public synchronized ResourceFileSystem getFileSystem() throws IOException { if (fileSystem == null) { final File zipFile = new File(zipFilePath); fileSystemDelegate = new JarFileSystem(zipFile); final FileObject rootFolder = fileSystemDelegate.getRoot(); if (rootFolder == null) { throw new FileNotFoundException(zipFilePath); } log.info(">>>> fileSystem: {}", fileSystemDelegate); latestModified = new DateTime(zipFile.lastModified()); timer.scheduleAtFixedRate(zipFileModificationTracker, modificationCheckInterval, modificationCheckInterval); fileSystem = new ResourceFileSystemNetBeansPlatform(fileSystemDelegate); } return fileSystem; } }
public void fileDeleted(FileEvent fe) { Enumeration en = existingFileObjects(getRoot()); while (en.hasMoreElements()) { AbstractFolder fo = (AbstractFolder)en.nextElement(); fo.validFlag = false; fo.fileDeleted0 (new FileEvent (fo)); } refreshRoot (); }
public void fileDeleted(FileEvent fe) { Enumeration en = existingFileObjects(getRoot()); while (en.hasMoreElements()) { AbstractFolder fo = (AbstractFolder)en.nextElement(); fo.validFlag = false; fo.fileDeleted0 (new FileEvent (fo)); } refreshRoot (); }
/** refreshes children recursively.*/ private void refreshExistingFileObjects () { Cache cache = getCache(); String[] empty = new String[0]; Enumeration en = existingFileObjects (getRoot ()); while (en.hasMoreElements()) { AbstractFolder fo = (AbstractFolder)en.nextElement(); assert fo != null; if (fo.isFolder() && !fo.isInitialized()) continue; String[] children = cache.getChildrenOf(fo.getPath()); if (children == null) children = empty; fo.refresh(null,null,true,true,children); } }
/** refreshes children recursively.*/ private void refreshExistingFileObjects () { Cache cache = getCache(); String[] empty = new String[0]; Enumeration en = existingFileObjects (getRoot ()); while (en.hasMoreElements()) { AbstractFolder fo = (AbstractFolder)en.nextElement(); assert fo != null; if (fo.isFolder() && !fo.isInitialized()) continue; String[] children = cache.getChildrenOf(fo.getPath()); if (children == null) children = empty; fo.refresh(null,null,true,true,children); } }
JarFileSystem jfs = new JarFileSystem(); jfs.setJarFile(file); FileObject appXml = jfs.getRoot().getFileObject("META-INF/application.xml"); if (appXml != null) { Application ear = DDProvider.getDefault().getDDRoot(appXml); for (FileObject child : jfs.getRoot().getChildren()) { if (child.hasExt("war") || child.hasExt("jar")) { // NOI18N JBTargetModuleID mod_id = new JBTargetModuleID(target[0], child.getNameExt());