public String extension() {
        int dotIndex = last().lastIndexOf('.');
        if (dotIndex < 0) return "";
        return last().substring(dotIndex + 1);
    }
Returns the extension of this file name, or an empty string if none.
integration/intellij/src/main/java/ai/vespa/intellij/schema/utils/Path.java