-
Notifications
You must be signed in to change notification settings - Fork 37
/
nativefs.hpp
62 lines (49 loc) · 1.43 KB
/
nativefs.hpp
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef NATIVEFS_HPP
#define NATIVEFS_HPP
#include "filedriverbase.hpp"
class NativeFS : public FileDriverBase
{
public:
NativeFS();
virtual ~NativeFS()
{}
const QString& extension() const
{
static const QString ext;
return ext;
} // extension
// Special method only for native fs: Filtering is supported here.
void setListingFilters(const QString& filters, bool listDirectories);
// method below performs init of the driver with the given ATN command string.
bool openHostFile(const QString& fileName);
void closeHostFile();
// Send realistic $ file basic listing, line by line (returning false means not supported).
bool sendListing(ISendLine& cb);
bool supportsListing() const
{
return true;
}
bool supportsMediaInfo() const
{
return true;
}
bool sendMediaInfo(ISendLine& cb);
bool newFile(const QString& fileName);
bool fopen(const QString& fileName);
QString openedFileName() const;
ushort openedFileSize() const;
char getc();
bool isEOF() const;
bool putc(char c);
bool close();
// Command to the command channel.
IOErrorMessage cmdChannel(const QString& cmd);
FSStatus status() const;
bool setCurrentDirectory(const QString& dir);
private:
// File to open, either as for checking its existance before trying another FS, or for reading .PRG native files.
QFile m_hostFile;
QString m_filters;
bool m_listDirectories;
};
#endif // NATIVEFS_HPP