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"
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 
52 {
53 }
54 
55 File
57 {
59 }
60 File
62 {
64 }
65 File
67 {
69 }
70 File
72 {
73  BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "openForAppendOrCreateFile");
74 }
75 File
77 {
79 }
80 File
82 {
84 }
85 int
86 FileSystemMockObject::changeFileOwner(const String& filename, const UserId& userId)
87 {
89 }
90 bool
92 {
94 }
95 #ifndef BLOCXX_WIN32
96 bool
98 {
100 }
101 #endif
102 bool
104 {
106 }
107 bool
109 {
111 }
112 #ifndef BLOCXX_WIN32
113 bool
115 {
117 }
118 #endif
119 bool
121 {
123 }
124 bool
126 {
128 }
129 bool
131 {
133 }
134 bool
135 FileSystemMockObject::getFileSize(const String& path, Int64& size)
136 {
138 }
139 UInt64
141 {
143 }
144 bool
146 {
148 }
149 bool
151 {
153 }
154 bool
156 {
158 }
159 bool
160 FileSystemMockObject::renameFile(const String& oldFileName, const String& newFileName)
161 {
163 }
164 size_t
165 FileSystemMockObject::read(const FileHandle& hdl, void* bfr, size_t numberOfBytes, Int64 offset)
166 {
168 }
169 size_t
170 FileSystemMockObject::write(FileHandle hdl, const void* bfr, size_t numberOfBytes, Int64 offset)
171 {
173 }
174 Int64
175 FileSystemMockObject::seek(const FileHandle& hdl, Int64 offset, int whence)
176 {
178 }
179 Int64
181 {
183 }
184 void
186 {
188 }
189 int
191 {
193 }
194 int
196 {
198 }
199 String
201 {
203 }
206 {
208 }
209 String
211 {
213 }
214 String
216 {
218 }
219 
220 std::pair<FileSystem::Path::ESecurity, String>
222 {
224 }
225 
226 std::pair<FileSystem::Path::ESecurity, String>
228 {
230 }
231 
232 std::pair<FileSystem::Path::ESecurity, String>
233 FileSystemMockObject::security(String const & base_dir, String const & rel_path, UserId uid)
234 {
236 }
237 
238 std::pair<FileSystem::Path::ESecurity, String>
239 FileSystemMockObject::security(String const & base_dir, String const & rel_path)
240 {
242 }
243 
244 String
246 {
248 }
249 
250 String
252 {
254 }
255 
256 String
258 {
259  BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "getCurrentWorkingDirectory");
260 }
261 
262 
263 } // end namespace BLOCXX_NAMESPACE
264 
265 
266 
267