2014-07-03 00:28:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
2017-07-30 13:03:54 +00:00
|
|
|
#include <unordered_set>
|
2014-07-03 00:28:29 +00:00
|
|
|
|
|
|
|
class FolderUtilities
|
|
|
|
{
|
2015-07-05 23:21:49 +00:00
|
|
|
private:
|
2015-07-11 12:27:22 +00:00
|
|
|
static string _homeFolder;
|
2017-08-12 02:20:07 +00:00
|
|
|
static string _saveFolderOverride;
|
|
|
|
static string _saveStateFolderOverride;
|
|
|
|
static string _screenshotFolderOverride;
|
2015-07-11 12:27:22 +00:00
|
|
|
static vector<string> _gameFolders;
|
2015-07-06 02:23:44 +00:00
|
|
|
|
2015-07-05 23:21:49 +00:00
|
|
|
public:
|
2015-07-11 12:27:22 +00:00
|
|
|
static void SetHomeFolder(string homeFolder);
|
|
|
|
static string GetHomeFolder();
|
2015-07-06 02:23:44 +00:00
|
|
|
|
2017-08-12 02:20:07 +00:00
|
|
|
static void SetFolderOverrides(string saveFolder, string saveStateFolder, string screenshotFolder);
|
|
|
|
|
2016-12-09 17:49:17 +00:00
|
|
|
static void AddKnownGameFolder(string gameFolder);
|
|
|
|
static vector<string> GetKnownGameFolders();
|
2015-07-06 02:23:44 +00:00
|
|
|
|
2015-07-11 12:27:22 +00:00
|
|
|
static string GetSaveFolder();
|
|
|
|
static string GetSaveStateFolder();
|
|
|
|
static string GetScreenshotFolder();
|
2015-08-15 01:50:14 +00:00
|
|
|
static string GetHdPackFolder();
|
2015-08-17 23:32:10 +00:00
|
|
|
static string GetDebuggerFolder();
|
2017-05-06 19:27:48 +00:00
|
|
|
static string GetRecentGamesFolder();
|
2014-07-03 00:28:29 +00:00
|
|
|
|
2015-07-11 12:27:22 +00:00
|
|
|
static vector<string> GetFolders(string rootFolder);
|
2017-07-30 13:03:54 +00:00
|
|
|
static vector<string> GetFilesInFolder(string rootFolder, std::unordered_set<string> extensions, bool recursive);
|
2014-07-03 00:28:29 +00:00
|
|
|
|
2015-07-11 12:27:22 +00:00
|
|
|
static string GetFilename(string filepath, bool includeExtension);
|
|
|
|
static string GetFolderName(string filepath);
|
2015-07-02 03:17:14 +00:00
|
|
|
|
2015-07-11 12:27:22 +00:00
|
|
|
static void CreateFolder(string folder);
|
2015-07-05 23:21:49 +00:00
|
|
|
|
2015-07-11 12:27:22 +00:00
|
|
|
static int64_t GetFileModificationTime(string filepath);
|
|
|
|
|
|
|
|
static string CombinePath(string folder, string filename);
|
2014-07-03 00:28:29 +00:00
|
|
|
};
|