summaryrefslogtreecommitdiff
path: root/library/filemanager.h
Unidiff
Diffstat (limited to 'library/filemanager.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/filemanager.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/library/filemanager.h b/library/filemanager.h
new file mode 100644
index 0000000..f8d9425
--- a/dev/null
+++ b/library/filemanager.h
@@ -0,0 +1,56 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef FILEMANAGER_H
21#define FILEMANAGER_H
22
23#include <qstring.h>
24#include <qstringlist.h>
25
26class AppLnk;
27class DocLnk;
28class FileManagerPrivate;
29
30class FileManager
31{
32public:
33 FileManager();
34 ~FileManager();
35
36 bool saveFile( const DocLnk&, const QByteArray &data );
37 bool saveFile( const DocLnk&, const QString &text );
38 bool loadFile( const DocLnk&, QByteArray &data );
39 bool loadFile( const DocLnk&, QString &text );
40 bool copyFile( const AppLnk &src, const AppLnk &dest );
41
42 // The caller must delete the return values.
43 QIODevice* openFile( const DocLnk& );
44 QIODevice* saveFile( const DocLnk& );
45
46 bool exists( const DocLnk& );
47
48protected:
49 bool ensurePathExists( const QString &fn );
50
51private:
52 FileManagerPrivate *d;
53};
54
55
56#endif