Skip to content

MTY_GetFileName

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Parse a path and extract the file name with or without the extension.

const char *MTY_GetFileName(
    const char * path,
    bool         extension
);

Parameters

path (const char *)

Path to a file.

extension (bool)

If interested in the extension, true, otherwise false to remove the file extension.

Return value

const char *

This buffer is allocated in thread local storage and must not be freed.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: File

Clone this wiki locally