ScummVM API documentation
msfile.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef DIRECTOR_LINGO_XLIBS_MSFILE_H
23 #define DIRECTOR_LINGO_XLIBS_MSFILE_H
24 
25 namespace Director {
26 
27 enum MSFileError {
28  msErrorNone = 0,
29 };
30 
31 class MSFileObject : public Object<MSFileObject> {
32 public:
33  MSFileError _lastError;
34 
35 public:
36  MSFileObject(ObjectType objType);
37  MSFileObject(const MSFileObject &obj);
38  ~MSFileObject() override;
39 
40  bool hasProp(const Common::String &propName) override;
41  Datum getProp(const Common::String &propName) override;
42 
43  void dispose() override;
44 };
45 
46 namespace MSFile {
47 extern const char *const xlibName;
48 extern const XlibFileDesc fileNames[];
49 
50 void open(ObjectType type, const Common::Path &path);
51 void close(ObjectType type);
52 
53 Common::Path resolveSourceFilePath(const Common::String &srcParam);
54 Common::SeekableReadStream *openSourceStream(const Common::Path &srcFilePath, const Common::String &srcParam, char dirSeperator);
55 Common::SeekableWriteStream *openDestinationStream(Common::String &destFileName);
56 bool copyStream(Common::SeekableReadStream *srcStream, Common::SeekableWriteStream *destStream);
57 bool copyGameFile(const Common::String &srcParam, const Common::String &destParam);
58 
59 void m_new(int nargs);
60 void m_dispose(int nargs);
61 void m_name(int nargs);
62 void m_getFullDirList(int nargs);
63 void m_getFileList(int nargs);
64 void m_getDirList(int nargs);
65 void m_getDiskFree(int nargs);
66 void m_getVolLabel(int nargs);
67 void m_createDir(int nargs);
68 void m_removeDir(int nargs);
69 void m_getCurrDir(int nargs);
70 void m_setCurrDir(int nargs);
71 void m_removeFile(int nargs);
72 void m_renameFile(int nargs);
73 void m_copyFile(int nargs);
74 void m_copyFiles(int nargs);
75 void m_setAppINI(int nargs);
76 void m_getAppINI(int nargs);
77 void m_getWindowsDirectory(int nargs);
78 void m_getWinVer(int nargs);
79 void m_restartWindows(int nargs);
80 void m_openFileDlg(int nargs);
81 void m_saveFileDlg(int nargs);
82 void m_getOFileName(int nargs);
83 void m_getSFileName(int nargs);
84 void m_displayDlg(int nargs);
85 void m_progMgrAdd(int args);
86 
87 } // End of namespace MSFile
88 
89 } // End of namespace Director
90 
91 #endif
Definition: str.h:59
Definition: path.h:52
Definition: stream.h:745
Definition: lingo-object.h:37
Definition: archive.h:36
Definition: msfile.h:31
Definition: lingo-object.h:71
Definition: lingo.h:130
Definition: stream.h:351