package org.jeecg.modules.system.util;

import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;
import java.util.List;

@Slf4j
public class FileUtil {

    private static final List<String> videoExtensions = Arrays.asList("mp4", "avi", "mov");

    /**
     * 是否为视频
     *
     * @param fileName
     * @return
     */
    public static boolean isVideo(String fileName) {
        String fileExtension = fileName.substring(fileName.lastIndexOf(".") + 1);
        return videoExtensions.contains(fileExtension);
    }
}
