blocxx
Main Page
Namespaces
Classes
Files
File List
File Members
src
blocxx
FileSystemMockObject.cpp
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2005, Quest Software, Inc. All rights reserved.
3
* Copyright (C) 2006, Novell, Inc. All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* * Redistributions of source code must retain the above copyright notice,
9
* this list of conditions and the following disclaimer.
10
* * Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* * Neither the name of
14
* Quest Software, Inc.,
15
* nor Novell, Inc.,
16
* nor the names of its contributors or employees may be used to
17
* endorse or promote products derived from this software without
18
* specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
* POSSIBILITY OF SUCH DAMAGE.
31
*******************************************************************************/
32
33
38
#include "blocxx/BLOCXX_config.h"
39
#include "
blocxx/FileSystemMockObject.hpp
"
40
#include "
blocxx/Exception.hpp
"
41
#include "
blocxx/File.hpp
"
42
#include "
blocxx/String.hpp
"
43
#include "
blocxx/Array.hpp
"
44
45
namespace
BLOCXX_NAMESPACE
46
{
47
48
BLOCXX_DECLARE_EXCEPTION
(FileSystemMockObjectUnimplemented);
49
BLOCXX_DEFINE_EXCEPTION
(FileSystemMockObjectUnimplemented);
50
51
FileSystemMockObject::~FileSystemMockObject
()
52
{
53
}
54
55
File
56
FileSystemMockObject::openFile
(
const
String
& path)
57
{
58
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"openFile"
);
59
}
60
File
61
FileSystemMockObject::createFile
(
const
String
& path)
62
{
63
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"createFile"
);
64
}
65
File
66
FileSystemMockObject::openOrCreateFile
(
const
String
& path)
67
{
68
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"openOrCreateFile"
);
69
}
70
File
71
FileSystemMockObject::openForAppendOrCreateFile
(
const
String
& path)
72
{
73
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"openForAppendOrCreateFile"
);
74
}
75
File
76
FileSystemMockObject::createTempFile
(
String
& filePath,
const
String
& dir)
77
{
78
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"createTempFile"
);
79
}
80
File
81
FileSystemMockObject::createTempFile
(
const
String
& dir)
82
{
83
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"createTempFile"
);
84
}
85
int
86
FileSystemMockObject::changeFileOwner
(
const
String
& filename,
const
UserId
& userId)
87
{
88
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"changeFileOwner"
);
89
}
90
bool
91
FileSystemMockObject::exists
(
const
String
& path)
92
{
93
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"exists"
);
94
}
95
#ifndef BLOCXX_WIN32
96
bool
97
FileSystemMockObject::isExecutable
(
const
String
& path)
98
{
99
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"isExecutable"
);
100
}
101
#endif
102
bool
103
FileSystemMockObject::canRead
(
const
String
& path)
104
{
105
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"canRead"
);
106
}
107
bool
108
FileSystemMockObject::canWrite
(
const
String
& path)
109
{
110
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"canWrite"
);
111
}
112
#ifndef BLOCXX_WIN32
113
bool
114
FileSystemMockObject::isLink
(
const
String
& path)
115
{
116
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"isLink"
);
117
}
118
#endif
119
bool
120
FileSystemMockObject::isDirectory
(
const
String
& path)
121
{
122
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"isDirectory"
);
123
}
124
bool
125
FileSystemMockObject::changeDirectory
(
const
String
& path)
126
{
127
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"changeDirectory"
);
128
}
129
bool
130
FileSystemMockObject::makeDirectory
(
const
String
& path,
int
mode)
131
{
132
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"makeDirectory"
);
133
}
134
bool
135
FileSystemMockObject::getFileSize
(
const
String
& path, Int64& size)
136
{
137
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"getFileSize"
);
138
}
139
UInt64
140
FileSystemMockObject::fileSize
(
FileHandle
fh)
141
{
142
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"fileSize"
);
143
}
144
bool
145
FileSystemMockObject::removeDirectory
(
const
String
& path)
146
{
147
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"removeDirectory"
);
148
}
149
bool
150
FileSystemMockObject::removeFile
(
const
String
& path)
151
{
152
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"removeFile"
);
153
}
154
bool
155
FileSystemMockObject::getDirectoryContents
(
const
String
& path,
StringArray
& dirEntries)
156
{
157
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"getDirectoryContents"
);
158
}
159
bool
160
FileSystemMockObject::renameFile
(
const
String
& oldFileName,
const
String
& newFileName)
161
{
162
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"renameFile"
);
163
}
164
size_t
165
FileSystemMockObject::read
(
const
FileHandle
& hdl,
void
* bfr,
size_t
numberOfBytes, Int64 offset)
166
{
167
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"read"
);
168
}
169
size_t
170
FileSystemMockObject::write
(
FileHandle
hdl,
const
void
* bfr,
size_t
numberOfBytes, Int64 offset)
171
{
172
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"write"
);
173
}
174
Int64
175
FileSystemMockObject::seek
(
const
FileHandle
& hdl, Int64 offset,
int
whence)
176
{
177
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"seek"
);
178
}
179
Int64
180
FileSystemMockObject::tell
(
const
FileHandle
& hdl)
181
{
182
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"tell"
);
183
}
184
void
185
FileSystemMockObject::rewind
(
const
FileHandle
& hdl)
186
{
187
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"rewind"
);
188
}
189
int
190
FileSystemMockObject::close
(
const
FileHandle
& hdl)
191
{
192
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"close"
);
193
}
194
int
195
FileSystemMockObject::flush
(
FileHandle
& hdl)
196
{
197
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"flush"
);
198
}
199
String
200
FileSystemMockObject::getFileContents
(
const
String
& filename)
201
{
202
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"getFileContents"
);
203
}
204
StringArray
205
FileSystemMockObject::getFileLines
(
const
String
& filename)
206
{
207
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"getFileLines"
);
208
}
209
String
210
FileSystemMockObject::readSymbolicLink
(
const
String
& path)
211
{
212
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"readSymbolicLink"
);
213
}
214
String
215
FileSystemMockObject::realPath
(
const
String
& path)
216
{
217
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"realPath"
);
218
}
219
220
std::pair<FileSystem::Path::ESecurity, String>
221
FileSystemMockObject::security
(
String
const
& path,
UserId
uid)
222
{
223
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"security"
);
224
}
225
226
std::pair<FileSystem::Path::ESecurity, String>
227
FileSystemMockObject::security
(
String
const
& path)
228
{
229
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"security"
);
230
}
231
232
std::pair<FileSystem::Path::ESecurity, String>
233
FileSystemMockObject::security
(
String
const
& base_dir,
String
const
& rel_path,
UserId
uid)
234
{
235
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"security"
);
236
}
237
238
std::pair<FileSystem::Path::ESecurity, String>
239
FileSystemMockObject::security
(
String
const
& base_dir,
String
const
& rel_path)
240
{
241
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"security"
);
242
}
243
244
String
245
FileSystemMockObject::dirname
(
const
String
& filename)
246
{
247
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"dirname"
);
248
}
249
250
String
251
FileSystemMockObject::basename
(
const
String
& filename)
252
{
253
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"basename"
);
254
}
255
256
String
257
FileSystemMockObject::getCurrentWorkingDirectory
()
258
{
259
BLOCXX_THROW
(
FileSystemMockObjectUnimplementedException
,
"getCurrentWorkingDirectory"
);
260
}
261
262
263
}
// end namespace BLOCXX_NAMESPACE
264
265
266
267
Generated by
1.8.2