package fileTest;

import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Spliterator;

import javax.imageio.ImageIO;

public class FileName {

    public static void main(String[] args) throws IOException {
        String dirName="C:\\Users\\dsp\\Desktop\\JP首页图片";//存放图片的文件夹
        File f=new File(dirName);
        ArrayList path=new ArrayList();//存放每个图片的路径
        if (f.isDirectory()) {
            String[] imgs=f.list();
                for(int i=0;i