Package com.denimgroup.threadfix.framework.filefilter

Examples of com.denimgroup.threadfix.framework.filefilter.FileExtensionFileFilter


        if (!rootDirectory.exists() || !rootDirectory.isDirectory()) {
            throw new IllegalArgumentException("Invalid directory passed to WebFormsEndpointGenerator: " + rootDirectory);
        }

        Collection ascxFiles = FileUtils.listFiles(rootDirectory,
                new FileExtensionFileFilter("ascx"), TrueFileFilter.INSTANCE);

        Map<String, AscxFile> map = newMap();

        for (Object aspxFile : ascxFiles) {
            if (aspxFile instanceof File) {
View Full Code Here


 
  @Nonnull
    @SuppressWarnings("unchecked")
  private static List<String> getFilePathsFromDirectory(File rootFile, String fileExtension) {
    Collection<File> files = FileUtils.listFiles(rootFile,
        new FileExtensionFileFilter(fileExtension),
        TrueFileFilter.INSTANCE);
   
    List<String> strings = list();
   
    for (File file : files) {
View Full Code Here

        urlToControllerMethodsMap = new HashMap<>();
        controllerToUrlsMap = new HashMap<>();

    if (rootDirectory.exists()) {
      javaFiles = FileUtils.listFiles(rootDirectory,
                    new FileExtensionFileFilter("java"), TrueFileFilter.INSTANCE);
        generateMaps();
    } else {
      javaFiles = Collections.emptyList();
    }
  }
View Full Code Here

    @Nonnull
    @Override
    public FrameworkType check(@Nonnull ProjectDirectory directory) {
        Collection files = FileUtils.listFiles(directory.getDirectory(),
                new FileExtensionFileFilter("aspx"), TrueFileFilter.INSTANCE);

        LOG.info("Got " + files.size() + " .aspx files from the directory.");

        return files.isEmpty() ? FrameworkType.NONE : FrameworkType.DOT_NET_WEB_FORMS;
    }
View Full Code Here

        modelParsers = new ArrayList<>();

        if (rootDirectory.exists() && rootDirectory.isDirectory()) {

            Collection<File> modelFiles = FileUtils.listFiles(rootDirectory,
                    new FileExtensionFileFilter("cs"), TrueFileFilter.INSTANCE);

            for (File file : modelFiles) {
                if (file != null && file.exists() && file.isFile()) {
                    modelParsers.add(ViewModelParser.parse(file));
                }
View Full Code Here

        entityParsers = list();

        if (rootDirectory.exists() && rootDirectory.isDirectory()) {

            Collection<File> modelFiles = FileUtils.listFiles(rootDirectory,
                    new FileExtensionFileFilter("java"), TrueFileFilter.INSTANCE);

            for (File file : modelFiles) {
                if (file != null && file.exists() && file.isFile()) {
                    entityParsers.add(SpringEntityParser.parse(file));
                }
View Full Code Here

        collapseToEndpoints(aspxCsParsers, aspxParsers, rootDirectory);
    }

    private List<AspxCsParser> getAspxCsParsers(File rootDirectory) {
        Collection aspxCsFiles = FileUtils.listFiles(rootDirectory,
                new FileExtensionFileFilter("aspx.cs"), TrueFileFilter.INSTANCE);

        List<AspxCsParser> aspxCsParsers = list();

        for (Object aspxCsFile : aspxCsFiles) {
            if (aspxCsFile instanceof File) {
View Full Code Here

    private List<AspxParser> getAspxParsers(File rootDirectory,
                                            Map<String, AscxFile> map,
                                            Map<String, AspxParser> masterFileMap) {
        Collection aspxFiles = FileUtils.listFiles(rootDirectory,
                new FileExtensionFileFilter("aspx"), TrueFileFilter.INSTANCE);

        List<AspxParser> aspxParsers = list();

        for (Object aspxFile : aspxFiles) {
            if (aspxFile instanceof File) {
View Full Code Here

        return aspxParsers;
    }

    File getAspxRoot(File rootDirectory) {
        Collection aspxCsFiles = FileUtils.listFiles(rootDirectory,
                new FileExtensionFileFilter(".config"), TrueFileFilter.INSTANCE);

        int shortestPathLength = Integer.MAX_VALUE;
        File returnFile = rootDirectory;

        for (Object aspxCsFile : aspxCsFiles) {
View Full Code Here

        assert rootDirectory.isDirectory() : "Root file was not a directory.";

        this.rootDirectory = rootDirectory;

        cSharpFiles = FileUtils.listFiles(rootDirectory,
                new FileExtensionFileFilter("cs"), TrueFileFilter.INSTANCE);

        generateMappings();
    }
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.framework.filefilter.FileExtensionFileFilter

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.