MyApplication.java 855 字节
import com.sanmang.service.VideoService;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

public class MyApplication {
    public static void main(String[] args) {
        if (args.length > 0) {
            String src = args[0];
            Path path = Paths.get(src);
            if (Files.exists(path) || Files.isDirectory(path)) {
                try {
                    VideoService service = new VideoService();
                    service.allInDir(src);
                } catch (InterruptedException | IOException e) {
                    e.printStackTrace();
                }
            } else {
                System.out.println("Directory not found.");
            }
        } else {
            System.out.println("Usage: java -jar video.jar yourVideoDir");
        }
    }
}