com.fastchar.extjs.core.FastExtDesktopHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastchar-extjs Show documentation
Show all versions of fastchar-extjs Show documentation
FastChar-ExtJs is a Java Web framework that uses extjs libraries.Quickly build a background management system
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