-
Notifications
You must be signed in to change notification settings - Fork 2
/
fileutils.h
46 lines (39 loc) · 1.29 KB
/
fileutils.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
#ifndef FILEUTILS_H
#define FILEUTILS_H
#include <QObject>
#include "wrappers/notewrapper.h"
#include <QDir>
#include <QFile>
#include <QDebug>
#include <QFileInfo>
#include <QFileInfoList>
#include <QStandardPaths>
class FileUtils : public QObject
{
Q_OBJECT
public:
explicit FileUtils(QObject *parent = 0);
static const QString NOTES_FOLDER;
static const QString APP_FOLDER;
static const QString CONTENT_FILENAME;
signals:
public slots:
static QString noteContentFilePath(NoteWrapper* note);
static QString myDocsFolderPath();
static QString noteFolderPath(NoteWrapper* note);
static QString noteFolderPath(std::string note);
static QString notesFolderPath();
static QString appFolderPath();
static QString resourceContentFilePath(Resource r);
static QString resourceFolderPath(Resource r);
static bool noteCached(NoteWrapper* note);
static void cacheNoteContent(NoteWrapper* note, QString content);
static bool resourceCached(Resource r);
static void cacheResourceContent(Resource r);
static QString getExtension(Resource r);
static bool removeDir(const QString &dirName);
static void removeNoteCache(Note note);
static void removeNoteDir();
static QString readNoteContent(NoteWrapper* note);
};
#endif // FILEUTILS_H