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

com.aventstack.extentreports.reporter.FileUtil Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version
package com.aventstack.extentreports.reporter;

import java.io.File;

public class FileUtil {
    private FileUtil() {
    }

    public static String getExtension(File f) {
        String name = f.getName();
        int i = name.lastIndexOf('.');
        if (i > 0)
            return name.substring(i + 1);
        return "";
    }

    public static String getExtension(String filePath) {
        return getExtension(new File(filePath));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy