• Get the extension of the path.

    Parameters

    • path: string

      The file path.

    Returns string

    the extension of the file.

    Notes

    The extension is the string from the last occurrence of the . character to end of string in the last portion of the path, inclusive. If there is no . in the last portion of the path, or if the first character of the basename of path [[basename]] is ., then an empty string is returned.