coastline 0.0.4
Loading...
Searching...
No Matches
filebrowser.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <filesystem>
9#include <optional>
10#include <span>
11#include <string>
12#include <string_view>
13#include <vector>
14
15#include "../paths.h"
16
17namespace coastline {
18
33
49 bool directoriesOnly = false);
50
59
65
71
72} // namespace coastline
Definition assetimport.h:11
std::string LowercaseExtension(const std::filesystem::path &path)
std::filesystem::path ResolveUserPath(std::string_view text, const std::filesystem::path &home)
Expand an initial home-directory shorthand and use native separators after expansion.
std::optional< std::vector< BrowserEntry > > ListBrowserDirectory(const std::filesystem::path &directory, std::span< const std::string_view > extensions, bool directoriesOnly=false)
List a directory for the file browser: .. first, or on Windows the drives at the root of a drive,...
std::filesystem::path PathFromUtf8(std::string_view text)
An entry of a listing of the file browser.
Definition filebrowser.h:20
Kind kind
Definition filebrowser.h:28
std::filesystem::path path
Definition filebrowser.h:29
Kind
What an entry opens or chooses.
Definition filebrowser.h:22
@ File
Definition filebrowser.h:26
@ Parent
Definition filebrowser.h:23
@ Directory
Definition filebrowser.h:25
@ Drive
Definition filebrowser.h:24
std::string label
Definition filebrowser.h:31
std::string name
Definition filebrowser.h:30