@Override public List<? extends IFile> listFiles() { List<IFile> results = new ArrayList<IFile>(); for (IFile child : _childFiles) { if (child.exists()) { results.add(child); } } return results; }
@Override public List<? extends IFile> listFiles() { List<IFile> results = new ArrayList<IFile>(); for (IFile child : _childFiles) { if (child.exists()) { results.add(child); } } return results; }
@Override public List<? extends IFile> listFiles() { List<IFile> results = new ArrayList<IFile>(); for (IFile child : _childFiles) { if (child.exists()) { results.add(child); } } return results; }
@Override public List<? extends IFile> listFiles() { List<IFile> results = new ArrayList<IFile>(); for (IFile child : _childFiles) { if (child.exists()) { results.add(child); } } return results; }
@Override public boolean hasChildFile(String path) { IFile childFile = file(path); return childFile != null && childFile.exists(); }
@Override public boolean hasChildFile(String path) { IFile childFile = file(path); return childFile != null && childFile.exists(); } }
@Override public boolean hasChildFile(String path) { IFile childFile = file(path); return childFile != null && childFile.exists(); }
@Override public boolean hasChildFile(String path) { IFile childFile = file(path); return childFile != null && childFile.exists(); }
@Override public boolean hasChildFile(String path) { IFile childFile = file(path); return childFile != null && childFile.exists(); }
private IFile findFirstFile(String resourceName, List<? extends IDirectory> searchPath) { for (IDirectory dir : searchPath) { IFile file = dir.file(resourceName); if (file != null && file.exists()) { return file; } } return null; }
private IFile findFirstFile(String resourceName, List<? extends IDirectory> searchPath) { for (IDirectory dir : searchPath) { IFile file = dir.file(resourceName); if (file != null && file.exists()) { return file; } } return null; }
private static List<? extends IFile> findAllFiles(String resourceName, List<? extends IDirectory> searchPath) { List<IFile> results = new ArrayList<IFile>(); for (IDirectory dir : searchPath) { IFile file = dir.file(resourceName); if (file != null && file.exists()) { results.add(file); } } return results; }
public static boolean containsManifest(IDirectory dir) { IFile manifestFile = dir.file( "META-INF/MANIFEST.MF" ); return manifestFile != null && manifestFile.exists(); }
public static boolean containsManifest(IDirectory dir) { IFile manifestFile = dir.file( "META-INF/MANIFEST.MF" ); return manifestFile != null && manifestFile.exists(); }
@Override public boolean hasChildFile(String path) { if (path.indexOf('/') == -1 && path.indexOf('\\') == -1) { return fileNamesSet().contains(path); } else { IFile childFile = file(path); return childFile != null && childFile.exists(); } } }
private IFile findFirstFile(String resourceName) { List<IDirectory> javaClassPath = _typeLoader.getModule().getJavaClassPath(); for (IDirectory dir : javaClassPath) { IFile file = dir.file(resourceName); if (file != null && file.exists()) { return file; } } throw new RuntimeException(new FileNotFoundException(resourceName)); }
private IFile getFileMatchCase( IDirectory dir, String strFileName ) { IFile file = dir.file( strFileName ); return file != null && file.exists() && IFileUtil.getBaseName( strFileName ).equals( file.getBaseName() ) ? file : null; }
@Override public PropertySet getPropertySet(String name) { IFile file = _filesByTypeName.get().get(name); if (file == null) { throw new IllegalArgumentException(name + " is not the name of a properties file property set"); } PropertySet result = new EmptyPropertySet(name); if (file.exists()) { try { InputStream propertiesStream = file.openInputStream(); Properties properties = new Properties(); try { properties.load(propertiesStream); result = new PropertiesPropertySet(name, properties); } finally { closeSafely(propertiesStream); } } catch (IOException e) { CommonServices.getEntityAccess().getLogger().error(String.format("Could not read property file %s", file), e); } } return result; }
public boolean isPathIgnored(String relativePath) { final IFile file = CommonServices.getFileSystem().getIFile(new File(relativePath)); if (file != null && file.exists() && isConfigFile(file)) { final IModule module = TypeSystem.getExecutionEnvironment().getModule(file); if (module != null) { for (IDirectory dir : module.getSourcePath()) { if ("config".equals(dir.getName()) && file.isDescendantOf(dir)) { return false; } } } //System.out.println("Ignoring: " + relativePath); return true; } // for (String pattern : IGNORE_DIRECTORY_PATTERNS) { // if (relativePath.contains(pattern)) { // return true; // } // } return HASH.matches(relativePath); }
private ISourceFileHandle findSourceFile() { IJavaClassInfo csr = this; while( csr.getEnclosingClass() != null ) { csr = csr.getEnclosingClass(); } List<IDirectory> backingSourcePath = getModule().getBackingSourcePath(); if( backingSourcePath != null ) { String classFileName = makeClassFileName(); for( IDirectory dir: backingSourcePath ) { IFile child = dir.file( classFileName ); if( child.exists() ) { return new AsmBackingSourceFileHandle( child, ((AsmClassJavaClassInfo)csr).getAsmType(), false ); } } } return null; }