• Return the extension of the path. Pop the last value of a list after path is split by question mark and comma.

    Parameters

    • pathname: string

      The path to process.

    Returns string

    The extension.

    pc.path.getExtension("/path/to/file.txt"); // returns ".txt"
    pc.path.getExtension("/path/to/file.jpg"); // returns ".jpg"
    pc.path.getExtension("/path/to/file.txt?function=getExtension"); // returns ".txt"