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