All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fastchar.extjs.core.FastExtDesktopHelper Maven / Gradle / Ivy

Go to download

FastChar-ExtJs is a Java Web framework that uses extjs libraries.Quickly build a background management system

There is a newer version: 2.2.2
Show newest version
package com.fastchar.extjs.core;

import com.fastchar.core.FastChar;
import com.fastchar.utils.FastFileUtils;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class FastExtDesktopHelper {


    public static List getAllBackgroundImage() {
        List allImages = new ArrayList<>();
        listBackgroundImageFiles(allImages, new File(FastChar.getPath().getWebRootPath(), "base/desktop"));
        return allImages;
    }

    private static void listBackgroundImageFiles(List files, File parent) {
        if (parent == null) {
            return;
        }

        File[] childFiles = parent.listFiles();
        if (childFiles == null) {
            return;
        }

        for (File childFile : childFiles) {
            if (childFile.isDirectory()) {
                listBackgroundImageFiles(files, childFile);
                continue;
            }
            if (childFile.getName().toLowerCase().startsWith("desktop_bg_img") && FastFileUtils.isImageFile(childFile.getName())) {
                files.add(childFile);
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy