• Return the basename of the path. That is the second element of the pair returned by passing path into path.split.

    Parameters

    • pathname: string

      The path to process.

    Returns string

    The basename.

    pc.path.getBasename("/path/to/file.txt"); // returns "file.txt"
    pc.path.getBasename("/path/to/dir"); // returns "dir"