-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopusADF.hpp
73 lines (49 loc) · 2.53 KB
/
opusADF.hpp
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
typedef std::shared_ptr<List> spList;
typedef std::shared_ptr<Device> spDevice;
typedef std::shared_ptr<Volume> spVolume;
typedef std::weak_ptr<Device> wpDevice;
typedef std::weak_ptr<Volume> wpVolume;
class cADFFindData {
public:
spList mHead;
List* mCell;
std::regex mFindMask;
};
class cADFPluginData {
HINSTANCE mAdfDll;
size_t mLastError;
std::wstring mPath;
spDevice mAdfDevice;
spVolume mAdfVolume;
protected:
LPVFSFILEDATAHEADER GetVFSforEntry(const Entry *pEntry, HANDLE pHeap);
void GetWfdForEntry(const Entry *pEntry, LPWIN32_FIND_DATA pData);
FILETIME GetFileTime(const Entry *pEntry);
void SetEntryTime(File *pFile, FILETIME pFT);
bool LoadFile(const std::wstring& pAfPath);
spList GetCurrentDirectoryList();
public:
cADFPluginData();
~cADFPluginData();
std::vector<std::wstring> GetPaths(std::wstring pPath);
bool AdfChangeToPath(const std::wstring& pPath, bool pIgnoreLast = false);
bool ReadDirectory(LPVFSREADDIRDATAW lpRDD);
bool ReadFile(File* pFile, size_t pBytes, std::uint8_t* pBuffer, LPDWORD pReadSize );
File* OpenFile(std::wstring pPath);
void CloseFile(File* pFile);
size_t TotalFreeBlocks(const std::wstring& pFile);
size_t TotalDiskBlocks(const std::wstring& pFile);
int Delete(LPVFSBATCHDATAW lpBatchData, const std::wstring& pPath, const std::wstring& pFile, bool pAll = false);
cADFFindData *FindFirstFile(LPTSTR lpszPath, LPWIN32_FIND_DATA lpwfdData, HANDLE hAbortEvent);
bool FindNextFile(cADFFindData* lpRAF, LPWIN32_FIND_DATA lpwfdData);
void FindClose(cADFFindData* lpRAF);
int Import(LPVFSBATCHDATAW lpBatchData, const std::wstring& pFile, const std::wstring& pPath);
int ImportFile(LPVFSBATCHDATAW lpBatchData, const std::wstring& pFile, const std::wstring& pPath);
int ImportPath(LPVFSBATCHDATAW lpBatchData, const std::wstring& pFile, const std::wstring& pPath);
int Extract(LPVFSBATCHDATAW lpBatchData, const std::wstring& pFile, const std::wstring& pDest);
int ExtractFile(LPVFSBATCHDATAW lpBatchData, const Entry* pEntry, const std::wstring& pDest);
int ExtractPath(LPVFSBATCHDATAW lpBatchData, const std::wstring& pPath, const std::wstring& pDest);
int ContextVerb(LPVFSCONTEXTVERBDATAW lpVerbData);
UINT BatchOperation(LPTSTR lpszPath, LPVFSBATCHDATAW lpBatchData);
bool PropGet(vfsProperty propId, LPVOID lpPropData, LPVOID lpData1, LPVOID lpData2, LPVOID lpData3);
};