Examples of findFiles()


Examples of org.jboss.dashboard.commons.io.DirectoriesScanner.findFiles()

                log.error("File format is not valid: " + f);
            }
        }

        DirectoriesScanner scannerHelp = new DirectoriesScanner("phelp");
        File[] helpFiles = scannerHelp.findFiles(fdir);
        for (int i = 0; i < helpFiles.length; i++) {
            File helpFile = helpFiles[i];
            PanelHelp pHelp = null;
            try {
                pHelp = loadHelpFile(helpFile);
View Full Code Here

Examples of org.jboss.dashboard.commons.io.DirectoriesScanner.findFiles()

    protected void createDatabase(String databaseName) throws Exception {
        // Search in the classpath for the SQL files for the given database.
        String sqlDir = Application.lookup().getBaseCfgDirectory() + File.separator + databaseConfigDir;
        Map<String, File> sqlFileMap = new HashMap<String, File>();
        DirectoriesScanner scanner = new DirectoriesScanner("sql");
        File[] sqlFiles = scanner.findFiles(new File(sqlDir));
        for (File sqlFile : sqlFiles) {
            // The file name must start with an ordinal which indicates the order of execution and finish with the databaseName.
            if (sqlFile.getName().endsWith(databaseName + ".sql") && Character.isDigit(sqlFile.getName().charAt(0))) {
                sqlFileMap.put(sqlFile.getName(), sqlFile);
            }
View Full Code Here

Examples of org.jboss.dashboard.commons.io.DirectoriesScanner.findFiles()

        File fdir = new File(dir);
        log.info("Loading panels. Scanning dir: " + fdir.getCanonicalPath());

        DirectoriesScanner scanner = new DirectoriesScanner("panel");
        File[] files = scanner.findFiles(fdir);

        for (int i = 0; i < files.length; i++) {
            File f = files[i];

            log.info("Reading file: " + f);
View Full Code Here

Examples of org.jboss.dashboard.commons.io.DirectoriesScanner.findFiles()

                log.error("File format is not valid: " + f);
            }
        }

        DirectoriesScanner scannerHelp = new DirectoriesScanner("phelp");
        File[] helpFiles = scannerHelp.findFiles(fdir);
        for (int i = 0; i < helpFiles.length; i++) {
            File helpFile = helpFiles[i];
            PanelHelp pHelp = null;
            try {
                pHelp = loadHelpFile(helpFile);
View Full Code Here

Examples of org.jboss.dashboard.commons.io.DirectoriesScanner.findFiles()

    protected void createDatabase(String databaseName) throws Exception {
        // Search in the classpath for the SQL files for the given database.
        String sqlDir = Application.lookup().getBaseCfgDirectory() + File.separator + databaseConfigDir;
        Map<String, File> sqlFileMap = new HashMap<String, File>();
        DirectoriesScanner scanner = new DirectoriesScanner("sql");
        File[] sqlFiles = scanner.findFiles(new File(sqlDir));
        for (File sqlFile : sqlFiles) {
            // The file name must start with an ordinal which indicates the order of execution and finish with the databaseName.
            if (sqlFile.getName().endsWith(databaseName + ".sql") && Character.isDigit(sqlFile.getName().charAt(0))) {
                sqlFileMap.put(sqlFile.getName(), sqlFile);
            }
View Full Code Here

Examples of org.jboss.dashboard.commons.io.DirectoriesScanner.findFiles()

    }

    protected List<DescriptorFile> initModuleFromDir(File moduleDir) throws IOException {
        List<DescriptorFile> descriptorFiles = new ArrayList<DescriptorFile>();
        DirectoriesScanner scanner = new DirectoriesScanner(FACTORY_EXTENSION);
        File[] descriptorsInside = scanner.findFiles(moduleDir);
        int preffixLength = moduleDir.getCanonicalPath().length() + 1;
        for (int i = 0; i < descriptorsInside.length; i++) {
            File file = descriptorsInside[i];
            String componentName = file.getCanonicalPath();
            componentName = componentName.substring(preffixLength, componentName.length() - 1 - FACTORY_EXTENSION.length());
View Full Code Here

Examples of org.jboss.dashboard.commons.io.DirectoriesScanner.findFiles()

    protected List<DescriptorFile> initModuleFromJar(String moduleName) throws IOException {
        List<DescriptorFile> descriptorFiles = new ArrayList<DescriptorFile>();
        String libPath = Application.lookup().getBaseAppDirectory() + File.separator + "WEB-INF" + File.separator + "lib";
        File libDir = new File(libPath);
        DirectoriesScanner ds = new DirectoriesScanner("jar");
        File[] jars = ds.findFiles(libDir);
        for (int i = 0; i < jars.length; i++) {
            File jar = jars[i];
            if (jar.getName().startsWith(moduleName)) {
                List<DescriptorFile> jarDescriptors = initModuleFromZip(jar);
                descriptorFiles.addAll(jarDescriptors);
View Full Code Here

Examples of org.sleuthkit.autopsy.casemodule.services.FileManager.findFiles()

     */
    private void getHistory() {
        FileManager fileManager = currentCase.getServices().getFileManager();
        List<AbstractFile> historyFiles;
        try {
            historyFiles = fileManager.findFiles(dataSource, "History", "Chrome"); //NON-NLS
        } catch (TskCoreException ex) {
            String msg = NbBundle.getMessage(this.getClass(), "Chrome.getHistory.errMsg.errGettingFiles");
            logger.log(Level.SEVERE, msg, ex);
            this.addErrorMessage(this.getName() + ": " + msg);
            return;
View Full Code Here

Examples of org.sleuthkit.autopsy.casemodule.services.FileManager.findFiles()

     */
    private void getBookmark() {    
        FileManager fileManager = currentCase.getServices().getFileManager();
        List<AbstractFile> bookmarkFiles = null;
        try {
            bookmarkFiles = fileManager.findFiles(dataSource, "Bookmarks", "Chrome"); //NON-NLS
        } catch (TskCoreException ex) {
            String msg = NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errGettingFiles");
            logger.log(Level.SEVERE, msg, ex);
            this.addErrorMessage(this.getName() + ": " + msg);
            return;
View Full Code Here

Examples of org.sleuthkit.autopsy.casemodule.services.FileManager.findFiles()

    private void getCookie() {
       
        FileManager fileManager = currentCase.getServices().getFileManager();
        List<AbstractFile> cookiesFiles;
        try {
            cookiesFiles = fileManager.findFiles(dataSource, "Cookies", "Chrome"); //NON-NLS
        } catch (TskCoreException ex) {
            String msg = NbBundle.getMessage(this.getClass(), "Chrome.getCookie.errMsg.errGettingFiles");
            logger.log(Level.SEVERE, msg, ex);
            this.addErrorMessage(this.getName() + ": " + msg);
            return;
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.