1#ifndef YAZE_UTIL_FILE_UTIL_H_
2#define YAZE_UTIL_FILE_UTIL_H_
29 const std::string& default_name =
"",
30 const std::string& default_extension =
"");
36 const std::string& default_name =
"",
37 const std::string& default_extension =
"");
39 const std::string& default_name =
"",
40 const std::string& default_extension =
"");
44 const std::string& folder_path);
46 const std::string& folder_path);
75std::string
GetFileName(
const std::string& filename);
77void SaveFile(
const std::string& filename,
const std::string& data);
87std::string
LoadFile(
const std::string& filename);
static std::string ShowSaveFileDialogBespoke(const std::string &default_name="", const std::string &default_extension="")
static std::string ShowOpenFileDialogBespoke()
static std::string ShowSaveFileDialogNFD(const std::string &default_name="", const std::string &default_extension="")
static std::string ShowOpenFolderDialogNFD()
static std::string ShowSaveFileDialog(const std::string &default_name="", const std::string &default_extension="")
ShowSaveFileDialog opens a save file dialog and returns the selected filepath. Uses global feature fl...
static std::string ShowOpenFileDialog()
ShowOpenFileDialog opens a file dialog and returns the selected filepath. Uses global feature flag to...
static std::string ShowOpenFolderDialog()
ShowOpenFolderDialog opens a file dialog and returns the selected folder path. Uses global feature fl...
static std::vector< std::string > GetFilesInFolder(const std::string &folder_path)
static std::vector< std::string > GetSubdirectoriesInFolder(const std::string &folder_path)
static std::string ShowOpenFolderDialogBespoke()
static std::string ShowOpenFileDialogNFD()
void SaveFile(const std::string &filename, const std::string &contents)
std::string GetFileName(const std::string &filename)
Gets the filename from a full path.
std::string GetResourcePath(const std::string &resource_path)
std::string LoadFileFromConfigDir(const std::string &filename)
Loads a file from the user's config directory.
std::string GetFileExtension(const std::string &filename)
Gets the file extension from a filename.
std::string GetBundleResourcePath()
GetBundleResourcePath returns the path to the bundle resource directory. Specific to MacOS.
std::string LoadFile(const std::string &filename)
Loads the entire contents of a file into a string.