tinyfd_openFileDialog

Parameters

title c_str

C-string or null

defaultPathAndFile c_str

C-string or null

numOfFilterPatterns int

0

filterPatterns c_str*

["*.jpg", "*.png"], or (on unix) MIME type ["audio/mp3"], or null

singleFilterDescription c_str

"Image files" or null

allowMultipleSelects bool

does not work on console

Return Value

Type: c_str

Selected file name or null on cancel. In case of multiple files, the separator is |.

Examples

const c_str[] patterns = ["*.cpp *.cc *.C *.cxx *.c++"];
c_str filename = tinyfd_openFileDialog(
    "Open a C++ File", null,
    cast(int)patterns.length, patterns.ptr,
    "C++ source code", false);
if (filename)
    tinyfd_messageBox("Chosen file is", filename, "ok", "info", 1);

Meta