-
Notifications
You must be signed in to change notification settings - Fork 1
/
Path.h
58 lines (53 loc) · 3.21 KB
/
Path.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//---------------------------------------------------------------------------
#ifndef PathH
#define PathH
//---------------------------------------------------------------------------
#include <vcl.h>
//---------------------------------------------------------------------------
namespace System
{
//---------------------------------------------------------------------------
class Path
{
public:
enum Location { lpApplication, lpCommon, lpDocuments, lpProjects };
private:
static String m_Application;
static String m_Common;
static String m_Documents;
static String m_Projects;
static String m_ProjectName;
static String m_Separator;
public:
__fastcall Path();
static void __fastcall Init();
static TStringDynArray __fastcall GetFiles(const String& folder, const String& filter);
static TStringDynArray __fastcall GetFiles(Location location, const String& filter, const String& subFolder = "");
static TStringDynArray __fastcall GetFolders(Location location, const String& subFolder = "");
static String __fastcall GetFolder(const Location location, const String& subFolder = "");
static String __fastcall GetFolderRelativeTo(const Location location, const String& path);
static String __fastcall GetActiveProjectFolder();
static String __fastcall Create(Location location, const String& subFolder);
static bool __fastcall Exists(Location location, const String& subFolder = "");
static void __fastcall Delete(Location location, const String& subFolder);
static void __fastcall Rename(Location location, const String& fromSubFolder, const String& toSubFolder);
// application specific files, configs etc (per installation)
static __property String Application = { read = m_Application };
// common game asset files, common application files (shared)
static __property String Common = { read = m_Common };
// OS documents folder. The base for all projects
static __property String Documents = { read = m_Documents };
// game projects folder (shared)
static __property String Projects = { read = m_Projects };
// active project folder
static __property String Project = { read = GetActiveProjectFolder };
// the active project name
static __property String ProjectName = { read = m_ProjectName, write = m_ProjectName };
// The OS file system path separator
static __property String Separator = { read = m_Separator };
};
extern PACKAGE Path Path;
//---------------------------------------------------------------------------
} // file namespace
//---------------------------------------------------------------------------
#endif