Description

Retrieves the base of a path

Usage

Parameters

  • path {String}

    Path

  • (optional) {Boolean}

    slash If there is a non-empty path and the parameter is true then a slash is added to the end of the string returned

Returns

String

Example

canvas.Materials.getBasePath("sound/sample.mp3"); // return "sound"

Discussion