-
Notifications
You must be signed in to change notification settings - Fork 0
/
SourceManager.h
49 lines (30 loc) · 1.45 KB
/
SourceManager.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
#pragma once
#include "Stdafx.h"
#include "SourceCollection.h"
#include "MountedFile.h"
class Archive;
class DirectoryFileSource;
class ResourceOverrider;
class FileSource;
class SourceManager{
public:
static void SetupFilesystemMounting();
static DirectoryFileSource* GetDirectorySourceForPath(const PlatformPath& path);
static Archive* OpenArchive(const PlatformPath& path);
static void ArchiveClosed(Archive* arch);
static void CloseAllArchives();
static void MountSource(::FileSource* source);
static void MountSourcePathOnce(::FileSource* source);
static int UnmountFilesFromSource(::FileSource* source);
//static void MountFile(const string& path, Archive* source, int index, bool TriggerModifed = false);
static void MountFile(const string& path, MountedFile& File, bool TriggerModifed = false);
//static void MountFile(const string& path, DirectoryFileSource* source, PlatformPath& realPath, bool TriggerModifed = false);
static void MountFilesList(Archive* source, vector<pair<string, int>>& fileList, int GroupId, bool triggerModifed = false );
static bool UnmountFile( const string& path );
private:
static std::map<PlatformPath::string_type, Archive*> OpenArchives;
static std::map<PlatformPath, DirectoryFileSource*> CreatedFileSources;
static std::map<string, int> GroupNameToId;
static ResourceOverrider* Overrider;
static SourceCollection* ExtraSources;
};