forked from Larswad/uno2iec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filedriverbase.cpp
executable file
·127 lines (92 loc) · 2.52 KB
/
filedriverbase.cpp
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#include "filedriverbase.hpp"
FileDriverBase::FileDriverBase()
: m_status(NOT_READY)
{
} // ctor
FileDriverBase::~FileDriverBase()
{
} // dtor
bool FileDriverBase::supportsType(const QString& fileName) const
{
foreach(const QString& ext, extension()) {
if(not ext.isEmpty() and fileName.endsWith(ext, Qt::CaseInsensitive))
return true;
}
return false;
} // supportsType
bool FileDriverBase::supportsListing() const
{
return false;
} // supportsListing
bool FileDriverBase::sendListing(ISendLine& /*cb*/)
{
return false;
} // sendListing
bool FileDriverBase::supportsMediaInfo() const
{
return false;
} // supportsMediaInfo
bool FileDriverBase::sendMediaInfo(ISendLine& /*cb*/)
{
return false;
} // sendMediaInfo
CBM::IOErrorMessage FileDriverBase::cmdChannel(const QString& cmd)
{
Q_UNUSED(cmd);
return CBM::ErrWriteProtectOn;
} // cmdChannel
bool FileDriverBase::fopen(const QString& fileName)
{
Q_UNUSED(fileName);
return false;
} // fopen
CBM::IOErrorMessage FileDriverBase::fopenWrite(const QString &fileName, bool replaceMode)
{
Q_UNUSED(fileName);
Q_UNUSED(replaceMode);
return CBM::ErrNotImplemented;
} // fopenWrite
bool FileDriverBase::fileExists(const QString &filePath)
{
Q_UNUSED(filePath);
return false;
} // fileExists
CBM::IOErrorMessage FileDriverBase::renameFile(const QString& oldName, const QString& newName)
{
Q_UNUSED(oldName);
Q_UNUSED(newName);
return CBM::ErrNotImplemented;
} // renameFile
CBM::IOErrorMessage FileDriverBase::copyFiles(const QStringList& sourceNames, const QString &destName)
{
Q_UNUSED(sourceNames);
Q_UNUSED(destName);
return CBM::ErrNotImplemented;
} // copyFiles
// returns a character to the open file. If not overridden, returns always true. If implemented returns false on failure.
bool FileDriverBase::putc(char c)
{
Q_UNUSED(c);
return true;
} // putc
FileDriverBase::FSStatus FileDriverBase::status(void) const
{
return static_cast<FSStatus>(m_status);
} // status
bool FileDriverBase::setCurrentDirectory(const QString& dir)
{
Q_UNUSED(dir);
return false;
} // setCurrentDirectory
CBM::IOErrorMessage FileDriverBase::newDisk(const QString& name, const QString& id)
{
Q_UNUSED(name);
Q_UNUSED(id);
// This may also mean it is not applicable to the image type in question.
return CBM::ErrNotImplemented;
} // newDisk
bool FileDriverBase::deleteFile(const QString& fileName)
{
Q_UNUSED(fileName);
return false;
} // deleteFile