Examples of DirectoryScanner


Examples of com.alibaba.antx.util.scanner.DirectoryScanner

    /**
     * ɨ���㡣
     */
    protected void scan(InputStream istream) {
        Handler handler = new Handler();
        Scanner scanner = new DirectoryScanner(getConfigEntryResource().getFile(), handler);

        try {
            scanner.scan();
        } catch (ScannerException e) {
            throw new ConfigException(e);
        }

        subEntries = handler.getSubEntries();
View Full Code Here

Examples of com.dbdeploy.scripts.DirectoryScanner

    DatabaseSchemaVersionManager databaseSchemaVersionManager =
        new DatabaseSchemaVersionManager(queryExecuter, changeLogTableName);

    ChangeScriptRepository changeScriptRepository =
        new ChangeScriptRepository(new DirectoryScanner(encoding).getChangeScriptsForDirectory(scriptdirectory));

    ChangeScriptApplier doScriptApplier;

    if (outputfile != null) {
      doScriptApplier = new TemplateBasedApplier(
View Full Code Here

Examples of com.luxoft.dnepr.courses.regular.unit7.scanners.DirectoryScanner

        files = Collections.synchronizedList(files);

        File root = new File(rootFolder);
        int producerThreadAmount = maxNumberOfThreads/2;
        ExecutorService executorService = Executors.newFixedThreadPool(producerThreadAmount);
        executorService.execute(new DirectoryScanner(root, executorService, queue));

        int consumerThreadAmount = maxNumberOfThreads/2 + maxNumberOfThreads%2;
        ExecutorService fileParserService = Executors.newFixedThreadPool(consumerThreadAmount);
        List<Future<?>> futures = new ArrayList<>();
        for (int i = 0; i < consumerThreadAmount; i++) {
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner

        this.factory = factory;
        this.statusFile = statusFile;
        if (statusFile.exists() && statusFile.length() > 0) {
            scanner = SpoutState.restoreState(pendingReplays, statusFile);
        } else {
            scanner = new DirectoryScanner(inputDirectory, inputFileNamePattern);
        }
    }
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner

    public DirectoryObserver(StreamParserFactory factory, File statusFile,
                             File inputDirectory, final Pattern inputFileNamePattern) {
        this.factory = factory;
        this.statusFile = statusFile;
        scanner = new DirectoryScanner(inputDirectory, inputFileNamePattern);
    }
View Full Code Here

Examples of com.thoughtworks.qdox.directorywalker.DirectoryScanner

      File dir = new File(m_dirPaths[i]);
      if(!dir.exists() || !dir.isDirectory()) {
        Utils.log(getClass().getName(), 1, "[WARNING] Invalid source directory " + m_dirPaths[i] + " ignored");
        continue;
      }
      DirectoryScanner scanner = new DirectoryScanner(dir);
      scanner.addFilter(new SuffixFilter(".java"));
      scanner.scan(new FileVisitor() {
        public void visitFile(File currentFile) {
          registerSourceFile(currentFile);
        }
      });
    }
View Full Code Here

Examples of org.apache.maven.bootstrap.util.DirectoryScanner

        {
            for ( Iterator it = config.getSourceLocations().iterator(); it.hasNext(); )
            {
                String sourceLocation = (String) it.next();

                DirectoryScanner scanner = new DirectoryScanner();

                scanner.setBasedir( sourceLocation );

                Set includes = config.getIncludes();
                if ( includes != null && !includes.isEmpty() )
                {
                    String[] inclStrs = (String[]) includes.toArray( new String[includes.size()] );
                    scanner.setIncludes( inclStrs );
                }
                else
                {
                    scanner.setIncludes( new String[]{"**/*.java"} );
                }

                Set excludes = config.getExcludes();
                if ( excludes != null && !excludes.isEmpty() )
                {
                    String[] exclStrs = (String[]) excludes.toArray( new String[excludes.size()] );
                    scanner.setIncludes( exclStrs );
                }

                scanner.scan();

                String[] sourceDirectorySources = scanner.getIncludedFiles();

                for ( int j = 0; j < sourceDirectorySources.length; j++ )
                {
                    File f = new File( sourceLocation, sourceDirectorySources[j] );

View Full Code Here

Examples of org.apache.maven.jxr.ant.DirectoryScanner

    public void processPath( PackageManager packageManager, String source, String bottom )
        throws IOException
    {
        this.transformer = new JavaCodeTransform( packageManager );

        DirectoryScanner ds = new DirectoryScanner();
        // I'm not sure why we don't use the directoryScanner in packageManager,
        // but since we don't we need to set includes/excludes here as well
        ds.setExcludes( excludes );
        ds.setIncludes( includes );
        ds.addDefaultExcludes();

        File dir = new File( source );

        if ( !dir.exists() )
        {
            if ( !dir.mkdirs() )
            {
                throw new IllegalStateException(
                    "Your source directory does not exist and could not be created:" + source );
            }
        }

        ds.setBasedir( source );
        ds.scan();

        //now get the list of included files

        String[] files = ds.getIncludedFiles();

        for ( int i = 0; i < files.length; ++i )
        {
            String src = source + System.getProperty( "file.separator" ) + files[i];
View Full Code Here

Examples of org.apache.maven.plugin.surefire.util.DirectoryScanner

        return scan.append( scanDeps );
    }

    private DefaultScanResult scanDirectories()
    {
        return new DirectoryScanner( getTestClassesDirectory(), getIncludeList(), getExcludeList(),
                                     getSpecificTests() ).scan();
    }
View Full Code Here

Examples of org.apache.maven.shared.utils.io.DirectoryScanner

            && getIncludedFiles( directory, INCLUDES, EXCLUDES ).length > 0;
    }

    private static String[] getIncludedFiles( File directory, String includes, String excludes )
    {
        DirectoryScanner scanner = new DirectoryScanner();

        scanner.setBasedir( directory );

        scanner.setIncludes( StringUtils.split( includes, "," ) );

        scanner.setExcludes( StringUtils.split( excludes, "," ) );

        scanner.scan();

        return scanner.getIncludedFiles();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.