#pragma once #include #include #include #include #include namespace hex::fs { enum class DialogMode { Open, Save, Folder }; struct ItemFilter { // Human-friendly name std::string name; // Extensions that constitute this filter std::string spec; }; void setFileBrowserErrorCallback(const std::function &callback); bool openFileBrowser(DialogMode mode, const std::vector &validExtensions, const std::function &callback, const std::string &defaultPath = {}, bool multiple = false); void openFileExternal(const std::fs::path &filePath); void openFolderExternal(const std::fs::path &dirPath); void openFolderWithSelectionExternal(const std::fs::path &selectedFilePath); bool isPathWritable(const std::fs::path &path); }