List of usage examples for org.apache.commons.io.filefilter FileFileFilter FILE
IOFileFilter FILE
To view the source code for org.apache.commons.io.filefilter FileFileFilter FILE.
Click Source Link
From source file:org.wso2.carbon.registry.extensions.handlers.scm.FilesystemManager.java
public String[] getDirectoryContent(String path) throws RegistryException { File directory = new File(baseDir, path); if (!directory.exists() || !directory.isDirectory()) { throw new RegistryException("A directory does not exist at path: " + directory.getAbsolutePath()); }//from ww w. j av a 2 s .c o m return directory.list(new AndFileFilter(HiddenFileFilter.VISIBLE, new OrFileFilter(DirectoryFileFilter.INSTANCE, FileFileFilter.FILE))); }
From source file:petascope.util.IOUtil.java
public static List<String> filesInDir(String dir) { List<String> ret = new ArrayList<String>(); URL uri = IOUtil.class.getClassLoader().getResource(dir); if (uri == null) { return ret; }// w ww .jav a2s. c o m String path = uri.toString(); if (path.startsWith("jar:")) { return filesInJarDir(dir); } String[] res = new File(removeScheme(path)).list(FileFileFilter.FILE); for (String f : res) { ret.add(wrapDir(dir) + f); } return ret; }