Package org.apache.commons.io.filefilter

Examples of org.apache.commons.io.filefilter.RegexFileFilter


    }
   
    @Test
    public void testReadAllRecords() throws IOException {
        FeatureCollection records = store.getRecords(Query.ALL, Transaction.AUTO_COMMIT);
        int fileCount = root.list(new RegexFileFilter("Record_.*\\.xml")).length;
        assertEquals(fileCount, records.size());
       
        FeatureIterator<Feature> fi = records.features();
        try {
            while(fi.hasNext()) {
View Full Code Here


       
        // drop the stores
        getGeoServer().reset();
       
        mosaic = new File(testData.getDataDirectoryRoot(), WATTEMP.getLocalPart());
        for (File file : FileUtils.listFiles(mosaic, new RegexFileFilter("NCOM_.*100_.*tiff"), null)) {
            File target = new File(file.getParentFile().getParentFile(), file.getName());
            movedFiles.add(target);
            if(target.exists()) {
                assertTrue(target.delete());
            }
            assertTrue(file.renameTo(target));
        };
        for (File file : FileUtils.listFiles(mosaic, new RegexFileFilter("watertemp.*"), null)) {
            assertTrue(file.delete());
        };
    }
View Full Code Here

     * @param processor
     * @throws IOException
     */
    public static void processFiles(File root, TemplateProcessor processor) throws IOException {

        Iterator<File> iterator = FileUtils.iterateFiles(root, new RegexFileFilter(FILE_TEMPLATE_PATTERN), TrueFileFilter.TRUE);

        while (iterator.hasNext()) {
            File next = iterator.next();

            try {
View Full Code Here

TOP

Related Classes of org.apache.commons.io.filefilter.RegexFileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.