@Override public boolean hasChildFile(String path) { return _delegate.hasChildFile(path); } }
private IFile getFileMatchCase( IDirectory dir, String strFileName ) { if (dir.hasChildFile(strFileName)) { IFile file = dir.file( strFileName ); try { if( doesFileMatchCase( strFileName, file ) ) { return file; } else { return null; } } catch( IOException e ) { throw new RuntimeException( e ); } } else { return null; } }
public boolean isPathIgnored(String relativePath) { if (relativePath == null) { return true; } final IFile file = CommonServices.getFileSystem().getIFile(new File(relativePath)); // AHK - We use file.getParent().hasChild() instead of file.exists() since we don't want to hit the disk // for the file existence check if we don't have to, and hasChild() will usually work off the cached sub-files // of a given directory if (file != null && file.getParent() != null && file.getParent().hasChildFile(file.getName()) && 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); }