Debian Codegraph @

src/fs/rcfs.h

raw symbols SCIP
1 // Copyright (C) 2014 Sacha Refshauge
2
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, version 3.0.
6
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // GNU General Public License 3.0 for more details.
11
12 // A copy of the GPL 3.0 should have been included with the program.
13 // If not, see http://www.gnu.org/licenses/
14
15 // Official GIT repository and contact information can be found at
16 // http://github.com/xsacha/Sachesi
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 }