-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathunpack.cpp
More file actions
37 lines (30 loc) · 703 Bytes
/
unpack.cpp
File metadata and controls
37 lines (30 loc) · 703 Bytes
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
#include "Code/define.h"
#include "Code/polyfs.hpp"
int CopyCallback(CFileIO *pSrcIO, CFileIO *pDstIO,
const char *pSrcPath, const char *pDstPath, unsigned long Length, void *Data)
{
printf("copy: %s -> %s, %d\n", pSrcPath, pDstPath, Length);
return 0;
}
int main(int argc, char *argv[])
{
if (argc != 3)
{
printf("usage %s: File.dat UnpackDir\n", argv[0]);
return 1;
}
CPFSFileIO PFSFileIO;
PFSFileIO.ChangeFileIO(gpFileIO);
if (!PFSFileIO.OpenDisk(argv[1], 1))
{
PFSFileIO.CloseDisk();
printf("OpenDisk: error");
return 1;
}
if (!CFileIO::XCopy(&PFSFileIO, gpFileIO, "\\", argv[2], CopyCallback, 0))
{
printf("XCopy: error");
}
PFSFileIO.CloseDisk();
return 0;
}