goja-core/src/main/java/goja/core/kits/lang/Strs.java
public static String getFilename(String path) {
        if (path == null) {
            return null;
        }
        int separatorIndex = path.lastIndexOf(StringPool.SLASH);
        return (separatorIndex != -1 ? path.substring(separatorIndex + 1) : path);
    }
public static String getFilename(String path) {
        if (path == null) {
            return null;
        }
        int separatorIndex = path.lastIndexOf(StringPool.SLASH);
        return (separatorIndex != -1 ? path.substring(separatorIndex + 1) : path);
    }
Extract the filename from the given path,
e.g. "mypath/myfile.txt" -> "myfile.txt".

@param path the file path (may be {@code null})
@return the extracted filename, or {@code null} if none