| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#pragma once |
| 19 |
|
| 20 |
#include "fs.h" |
| 21 |
|
| 22 |
namespace FS { |
| 23 |
|
| 24 |
struct rinode { |
| 25 |
int mode; |
| 26 |
QString name; |
| 27 |
int nameoffset; |
| 28 |
int offset; |
| 29 |
int size; |
| 30 |
int time; |
| 31 |
QString path_to; |
| 32 |
int chunks; |
| 33 |
}; |
| 34 |
|
| 35 |
class RCFS : public QFileSystem |
| 36 |
{ |
| 37 |
Q_OBJECT |
| 38 |
|
| 39 |
public: |
| 40 |
explicit RCFS(QString filename, QIODevice* file, qint64 offset, qint64 size, QString path) |
| 41 |
: QFileSystem(filename, file, offset, size, path, ".rcfs") {} |
| 42 |
|
| 43 |
rinode createNode(int offset); |
| 44 |
QString generateName(QString imageExt = ""); |
| 45 |
QByteArray extractFile(qint64 node_offset, int node_size, int node_mode); |
| 46 |
void extractDir(int offset, int numNodes, QString basedir, qint64 startPos); |
| 47 |
|
| 48 |
bool createContents(); |
| 49 |
|
| 50 |
}; |
| 51 |
|
| 52 |
} |