• Return the path without file name. If path is relative path, start with period.

    Parameters

    • pathname: string

      The full path to process.

    Returns string

    The path without a last element from list split by slash.

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