Description

Gets the file name with or without the extension in a path

Usage

Parameters

  • path {String}

    Path

  • ext {Boolean} optional

    (optional) Show extension if true (false by default)

Returns

String

Example

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

Discussion