williamr@4
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
2 |
// All rights reserved.
|
williamr@4
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
williamr@4
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
7 |
//
|
williamr@4
|
8 |
// Initial Contributors:
|
williamr@4
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@4
|
10 |
//
|
williamr@4
|
11 |
// Contributors:
|
williamr@4
|
12 |
//
|
williamr@4
|
13 |
// Description:
|
williamr@4
|
14 |
// f32\inc\f32file64.inl
|
williamr@4
|
15 |
//
|
williamr@4
|
16 |
//
|
williamr@4
|
17 |
|
williamr@4
|
18 |
/**
|
williamr@4
|
19 |
|
williamr@4
|
20 |
Reads from the file at the current position.
|
williamr@4
|
21 |
|
williamr@4
|
22 |
This is a synchronous function.
|
williamr@4
|
23 |
|
williamr@4
|
24 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
25 |
no error is returned.
|
williamr@4
|
26 |
The descriptor's length is set to the number of bytes read into
|
williamr@4
|
27 |
it. Therefore, when reading through a file,the end of file has been reached
|
williamr@4
|
28 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
29 |
|
williamr@4
|
30 |
@param aDes Descriptor into which binary data is read. Any existing contents
|
williamr@4
|
31 |
are overwritten. On return, its length is set to the number of
|
williamr@4
|
32 |
bytes read.
|
williamr@4
|
33 |
@return KErrNone if successful, otherwise one of the other system-wide error
|
williamr@4
|
34 |
codes.
|
williamr@4
|
35 |
|
williamr@4
|
36 |
@see TDesC8::Length
|
williamr@4
|
37 |
*/
|
williamr@4
|
38 |
inline TInt RFile64::Read(TDes8& aDes) const
|
williamr@4
|
39 |
{return RFile::Read(aDes);}
|
williamr@4
|
40 |
|
williamr@4
|
41 |
/**
|
williamr@4
|
42 |
Reads from the file at the current position.
|
williamr@4
|
43 |
|
williamr@4
|
44 |
This is an asynchronous function.
|
williamr@4
|
45 |
|
williamr@4
|
46 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
47 |
no error is returned.
|
williamr@4
|
48 |
The descriptor's length is set to the number of bytes read into
|
williamr@4
|
49 |
it. Therefore, when reading through a file,the end of file has been reached
|
williamr@4
|
50 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
51 |
|
williamr@4
|
52 |
@param aDes Descriptor into which binary data is read. Any existing contents
|
williamr@4
|
53 |
are overwritten. On return, its length is set to the number of
|
williamr@4
|
54 |
bytes read.
|
williamr@4
|
55 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
56 |
represents may not complete until some time after the call
|
williamr@4
|
57 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
58 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
59 |
been notified that the request is complete.
|
williamr@4
|
60 |
|
williamr@4
|
61 |
@param aStatus Request status. On completion contains:
|
williamr@4
|
62 |
KErrNone, if successful, otherwise one of the other system-wide error codes.
|
williamr@4
|
63 |
|
williamr@4
|
64 |
@see TDesC8::Length
|
williamr@4
|
65 |
*/
|
williamr@4
|
66 |
inline void RFile64::Read(TDes8& aDes,TRequestStatus& aStatus) const
|
williamr@4
|
67 |
{RFile::Read(aDes, aStatus);}
|
williamr@4
|
68 |
|
williamr@4
|
69 |
/**
|
williamr@4
|
70 |
Reads the specified number of bytes of binary data from the file at the current position.
|
williamr@4
|
71 |
|
williamr@4
|
72 |
This is a synchronous function.
|
williamr@4
|
73 |
|
williamr@4
|
74 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
75 |
no error is returned.
|
williamr@4
|
76 |
The descriptor's length is set to the number of bytes read into
|
williamr@4
|
77 |
it. Therefore, when reading through a file,the end of file has been reached
|
williamr@4
|
78 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
79 |
Assuming aLength is less than the maximum length of the descriptor, the only circumstance
|
williamr@4
|
80 |
in which Read() can return fewer bytes than requested, is when the end of
|
williamr@4
|
81 |
file is reached or if an error occurs.
|
williamr@4
|
82 |
|
williamr@4
|
83 |
@param aDes Descriptor into which binary data is read. Any existing
|
williamr@4
|
84 |
contents are overwritten. On return, its length is set to
|
williamr@4
|
85 |
the number of bytes read.
|
williamr@4
|
86 |
|
williamr@4
|
87 |
@param aLength The number of bytes to be read from the file into the descriptor.
|
williamr@4
|
88 |
If an attempt is made to read more bytes than the descriptor's
|
williamr@4
|
89 |
maximum length, the function returns KErrOverflow.
|
williamr@4
|
90 |
This value must not be negative, otherwise the function
|
williamr@4
|
91 |
returns KErrArgument.
|
williamr@4
|
92 |
|
williamr@4
|
93 |
@return KErrNone if successful, otherwise one of the other system-wide error
|
williamr@4
|
94 |
codes.
|
williamr@4
|
95 |
*/
|
williamr@4
|
96 |
inline TInt RFile64::Read(TDes8& aDes,TInt aLength) const
|
williamr@4
|
97 |
{return RFile::Read(aDes, aLength);}
|
williamr@4
|
98 |
|
williamr@4
|
99 |
/**
|
williamr@4
|
100 |
Reads a specified number of bytes of binary data from the file at the current position.
|
williamr@4
|
101 |
|
williamr@4
|
102 |
This is an asynchronous function.
|
williamr@4
|
103 |
|
williamr@4
|
104 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
105 |
no error is returned.
|
williamr@4
|
106 |
The descriptor's length is set to the number of bytes read into it.
|
williamr@4
|
107 |
Therefore, when reading through a file, the end of file has been reached
|
williamr@4
|
108 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
109 |
Assuming aLength is less than the maximum length of the descriptor, the only
|
williamr@4
|
110 |
circumstances in which Read() can return fewer bytes than requested is when
|
williamr@4
|
111 |
the end of file is reached or if an error has occurred.
|
williamr@4
|
112 |
|
williamr@4
|
113 |
@param aDes Descriptor into which binary data is read. Any existing
|
williamr@4
|
114 |
contents are overwritten. On return, its length is set to the
|
williamr@4
|
115 |
number of bytes read.
|
williamr@4
|
116 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
117 |
represents may not complete until some time after the call
|
williamr@4
|
118 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
119 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
120 |
been notified that the request is complete.
|
williamr@4
|
121 |
|
williamr@4
|
122 |
@param aLength The number of bytes to be read from the file into the descriptor.
|
williamr@4
|
123 |
If an attempt is made to read more bytes than the descriptor's
|
williamr@4
|
124 |
maximum length, then the function updates aStatus parameter with KErrOverflow.
|
williamr@4
|
125 |
It must not be negative otherwise the function updates aStatus with KErrArgument.
|
williamr@4
|
126 |
|
williamr@4
|
127 |
@param aStatus Request status. On completion contains KErrNone if successful,
|
williamr@4
|
128 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
129 |
*/
|
williamr@4
|
130 |
inline void RFile64::Read(TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const
|
williamr@4
|
131 |
{ RFile::Read( aDes, aLength, aStatus);}
|
williamr@4
|
132 |
|
williamr@4
|
133 |
/**
|
williamr@4
|
134 |
Writes to the file at the current offset within the file.
|
williamr@4
|
135 |
|
williamr@4
|
136 |
This is a synchronous function.
|
williamr@4
|
137 |
|
williamr@4
|
138 |
@param aDes The descriptor from which binary data is written.
|
williamr@4
|
139 |
The function writes the entire contents of aDes to the file.
|
williamr@4
|
140 |
|
williamr@4
|
141 |
@return KErrNone if successful, otherwise one of the other system-wide error
|
williamr@4
|
142 |
codes.
|
williamr@4
|
143 |
*/
|
williamr@4
|
144 |
inline TInt RFile64::Write(const TDesC8& aDes)
|
williamr@4
|
145 |
{return RFile::Write(aDes);}
|
williamr@4
|
146 |
|
williamr@4
|
147 |
|
williamr@4
|
148 |
/**
|
williamr@4
|
149 |
Writes to the file at the current offset within the file.
|
williamr@4
|
150 |
|
williamr@4
|
151 |
This is an asynchronous function.
|
williamr@4
|
152 |
|
williamr@4
|
153 |
@param aDes The descriptor from which binary data is written.
|
williamr@4
|
154 |
The function writes the entire contents of aDes to the file.
|
williamr@4
|
155 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
156 |
represents may not complete until some time after the call
|
williamr@4
|
157 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
158 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
159 |
been notified that the request is complete.
|
williamr@4
|
160 |
|
williamr@4
|
161 |
@param aStatus Request status. On completion contains KErrNone if successful,
|
williamr@4
|
162 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
163 |
*/
|
williamr@4
|
164 |
inline void RFile64::Write(const TDesC8& aDes,TRequestStatus& aStatus)
|
williamr@4
|
165 |
{RFile::Write(aDes, aStatus);}
|
williamr@4
|
166 |
|
williamr@4
|
167 |
|
williamr@4
|
168 |
/**
|
williamr@4
|
169 |
Writes a portion of a descriptor to the file at the current offset within
|
williamr@4
|
170 |
the file.
|
williamr@4
|
171 |
|
williamr@4
|
172 |
This is a synchronous function.
|
williamr@4
|
173 |
|
williamr@4
|
174 |
@param aDes The descriptor from which binary data is written.
|
williamr@4
|
175 |
@param aLength The number of bytes to be written from the descriptor.
|
williamr@4
|
176 |
This must not be greater than the length of the descriptor.
|
williamr@4
|
177 |
It must not be negative.
|
williamr@4
|
178 |
|
williamr@4
|
179 |
@return KErrNone if successful; KErrArgument if aLength is negative;
|
williamr@4
|
180 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
181 |
|
williamr@4
|
182 |
@panic FSCLIENT 27 in debug mode, if aLength is greater than the length
|
williamr@4
|
183 |
of the descriptor aDes.
|
williamr@4
|
184 |
*/
|
williamr@4
|
185 |
inline TInt RFile64::Write(const TDesC8& aDes,TInt aLength)
|
williamr@4
|
186 |
{return RFile::Write(aDes, aLength);}
|
williamr@4
|
187 |
|
williamr@4
|
188 |
|
williamr@4
|
189 |
/**
|
williamr@4
|
190 |
Writes a portion of a descriptor to the file at the current offset
|
williamr@4
|
191 |
within the file.
|
williamr@4
|
192 |
|
williamr@4
|
193 |
This is an asynchronous function.
|
williamr@4
|
194 |
|
williamr@4
|
195 |
@param aDes The descriptor from which binary data is written.
|
williamr@4
|
196 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
197 |
represents may not complete until some time after the call
|
williamr@4
|
198 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
199 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
200 |
been notified that the request is complete.
|
williamr@4
|
201 |
|
williamr@4
|
202 |
@param aLength The number of bytes to be written from the descriptor.
|
williamr@4
|
203 |
This must not be greater than the length of the descriptor.
|
williamr@4
|
204 |
It must not be negative.
|
williamr@4
|
205 |
|
williamr@4
|
206 |
@param aStatus Request status. On completion contains KErrNone if successful;
|
williamr@4
|
207 |
KErrArgument if aLength is negative;
|
williamr@4
|
208 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
209 |
*/
|
williamr@4
|
210 |
inline void RFile64::Write(const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus)
|
williamr@4
|
211 |
{RFile::Write(aDes, aLength, aStatus);}
|
williamr@4
|
212 |
|
williamr@4
|
213 |
/**
|
williamr@4
|
214 |
Reads from the file at the specified offset within the file
|
williamr@4
|
215 |
|
williamr@4
|
216 |
This is a synchronous function.
|
williamr@4
|
217 |
|
williamr@4
|
218 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
219 |
no error is returned.
|
williamr@4
|
220 |
The descriptor's length is set to the number of bytes read into it.
|
williamr@4
|
221 |
Therefore, when reading through a file, the end of file has been reached
|
williamr@4
|
222 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
223 |
|
williamr@4
|
224 |
Note:
|
williamr@4
|
225 |
1. This function over-rides the base class function RFile::Read
|
williamr@4
|
226 |
and inlines the base class RFile::Read.
|
williamr@4
|
227 |
2. The difference is that this function can read beyond 2GB - 1 when
|
williamr@4
|
228 |
aPos + length of aDes is beyond 2GB - 1.
|
williamr@4
|
229 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
230 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
231 |
this function becomes a private overload and hence use of
|
williamr@4
|
232 |
TInt RFile64::Read(TInt64 aPos,TDes8& aDes) const is recommended.
|
williamr@4
|
233 |
|
williamr@4
|
234 |
@see TInt RFile::Read(TInt aPos,TDes8& aDes) const
|
williamr@4
|
235 |
@see TInt RFile64::Read(TInt64 aPos,TDes8& aDes) const
|
williamr@4
|
236 |
|
williamr@4
|
237 |
@param aPos Position of first byte to be read. This is an offset from
|
williamr@4
|
238 |
the start of the file. If no position is specified, reading
|
williamr@4
|
239 |
begins at the current file position.
|
williamr@4
|
240 |
If aPos is beyond the end of the file, the function returns
|
williamr@4
|
241 |
a zero length descriptor.
|
williamr@4
|
242 |
|
williamr@4
|
243 |
@param aDes The descriptor into which binary data is read. Any existing content
|
williamr@4
|
244 |
is overwritten. On return, its length is set to the number of
|
williamr@4
|
245 |
bytes read.
|
williamr@4
|
246 |
|
williamr@4
|
247 |
@return KErrNone if successful, otherwise one of the other system-wide error
|
williamr@4
|
248 |
codes.
|
williamr@4
|
249 |
|
williamr@4
|
250 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
251 |
*/
|
williamr@4
|
252 |
|
williamr@4
|
253 |
inline TInt RFile64::Read(TInt aPos,TDes8& aDes) const
|
williamr@4
|
254 |
{return RFile::Read(aPos, aDes);}
|
williamr@4
|
255 |
|
williamr@4
|
256 |
/**
|
williamr@4
|
257 |
Reads from the file at the specified offset within the file.
|
williamr@4
|
258 |
|
williamr@4
|
259 |
This is an asynchronous function.
|
williamr@4
|
260 |
|
williamr@4
|
261 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
262 |
no error is returned.
|
williamr@4
|
263 |
The descriptor's length is set to the number of bytes read into it.
|
williamr@4
|
264 |
Therefore, when reading through a file, the end of file has been reached
|
williamr@4
|
265 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
266 |
|
williamr@4
|
267 |
Note:
|
williamr@4
|
268 |
1. This function over-rides the base class function RFile::Read
|
williamr@4
|
269 |
and inlines the base class RFile::Read.
|
williamr@4
|
270 |
2. The difference is that this function can read beyond 2GB - 1 when
|
williamr@4
|
271 |
aPos + length of aDes is beyond 2GB - 1.
|
williamr@4
|
272 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
273 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
274 |
this function becomes a private overload and hence use of
|
williamr@4
|
275 |
void RFile64::Read(TInt64 aPos,TDes8& aDes,TRequestStatus& aStatus) const is recommended.
|
williamr@4
|
276 |
|
williamr@4
|
277 |
@see void RFile::Read(TInt aPos,TDes8& aDes,TRequestStatus& aStatus) const
|
williamr@4
|
278 |
@see void RFile64::Read(TInt64 aPos,TDes8& aDes,TRequestStatus& aStatus) const
|
williamr@4
|
279 |
|
williamr@4
|
280 |
@param aPos Position of first byte to be read. This is an offset from
|
williamr@4
|
281 |
the start of the file. If no position is specified,
|
williamr@4
|
282 |
reading begins at the current file position.
|
williamr@4
|
283 |
If aPos is beyond the end of the file, the function returns
|
williamr@4
|
284 |
a zero length descriptor.
|
williamr@4
|
285 |
|
williamr@4
|
286 |
@param aDes The descriptor into which binary data is read. Any existing
|
williamr@4
|
287 |
content is overwritten. On return, its length is set to
|
williamr@4
|
288 |
the number of bytes read.
|
williamr@4
|
289 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
290 |
represents may not complete until some time after the call
|
williamr@4
|
291 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
292 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
293 |
been notified that the request is complete.
|
williamr@4
|
294 |
|
williamr@4
|
295 |
@param aStatus The request status. On completion, contains an error code of KErrNone
|
williamr@4
|
296 |
if successful, otherwise one of the other system-wide error codes.
|
williamr@4
|
297 |
|
williamr@4
|
298 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
299 |
*/
|
williamr@4
|
300 |
inline void RFile64::Read(TInt aPos,TDes8& aDes,TRequestStatus& aStatus) const
|
williamr@4
|
301 |
{RFile::Read(aPos, aDes, aStatus);}
|
williamr@4
|
302 |
|
williamr@4
|
303 |
/**
|
williamr@4
|
304 |
Reads the specified number of bytes of binary data from the file at a specified
|
williamr@4
|
305 |
offset within the file.
|
williamr@4
|
306 |
|
williamr@4
|
307 |
This is a synchronous function.
|
williamr@4
|
308 |
|
williamr@4
|
309 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
310 |
no error is returned.
|
williamr@4
|
311 |
The descriptor's length is set to the number of bytes read into it.
|
williamr@4
|
312 |
Therefore, when reading through a file, the end of file has been reached
|
williamr@4
|
313 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
314 |
Assuming aLength is less than the maximum length of the descriptor, the only
|
williamr@4
|
315 |
circumstances in which Read() can return fewer bytes than requested is when
|
williamr@4
|
316 |
the end of file is reached or if an error has occurred.
|
williamr@4
|
317 |
|
williamr@4
|
318 |
Note:
|
williamr@4
|
319 |
1. This function over-rides the base class function RFile::Read
|
williamr@4
|
320 |
and inlines the base class RFile::Read.
|
williamr@4
|
321 |
2. The difference is that this function can read beyond 2GB - 1 when
|
williamr@4
|
322 |
aPos + aLength is beyond 2GB - 1.
|
williamr@4
|
323 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
324 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
325 |
this function becomes a private overload and hence use of
|
williamr@4
|
326 |
TInt RFile64::Read(TInt64 aPos,TDes8& aDes,TInt aLength) const is recommended.
|
williamr@4
|
327 |
|
williamr@4
|
328 |
@see TInt RFile::Read(TInt aPos,TDes8& aDes,TInt aLength) const
|
williamr@4
|
329 |
@see TInt RFile64::Read(TInt64 aPos,TDes8& aDes,TInt aLength) const
|
williamr@4
|
330 |
|
williamr@4
|
331 |
@param aPos Position of first byte to be read. This is an offset from
|
williamr@4
|
332 |
the start of the file. If no position is specified,
|
williamr@4
|
333 |
reading begins at the current file position.
|
williamr@4
|
334 |
If aPos is beyond the end of the file, the function returns
|
williamr@4
|
335 |
a zero length descriptor.
|
williamr@4
|
336 |
|
williamr@4
|
337 |
@param aDes The descriptor into which binary data is read. Any existing
|
williamr@4
|
338 |
contents are overwritten. On return, its length is set to
|
williamr@4
|
339 |
the number of bytes read.
|
williamr@4
|
340 |
@param aLength The number of bytes to read from the file into the descriptor.
|
williamr@4
|
341 |
If an attempt is made to read more bytes than the descriptor's
|
williamr@4
|
342 |
maximum length, then the function updates aStatus parameter with KErrOverflow.
|
williamr@4
|
343 |
It must not be negative otherwise the function updates aStatus with KErrArgument.
|
williamr@4
|
344 |
|
williamr@4
|
345 |
@return KErrNone if successful, otherwise one of the other system-wide
|
williamr@4
|
346 |
error codes.
|
williamr@4
|
347 |
|
williamr@4
|
348 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
349 |
*/
|
williamr@4
|
350 |
inline TInt RFile64::Read(TInt aPos,TDes8& aDes,TInt aLength) const
|
williamr@4
|
351 |
{return RFile::Read(aPos, aDes, aLength);}
|
williamr@4
|
352 |
|
williamr@4
|
353 |
/**
|
williamr@4
|
354 |
Reads the specified number of bytes of binary data from the file at a specified
|
williamr@4
|
355 |
offset within the file.
|
williamr@4
|
356 |
|
williamr@4
|
357 |
This is an asynchronous function.
|
williamr@4
|
358 |
|
williamr@4
|
359 |
|
williamr@4
|
360 |
Note that when an attempt is made to read beyond the end of the file,
|
williamr@4
|
361 |
no error is returned.
|
williamr@4
|
362 |
The descriptor's length is set to the number of bytes read into it.
|
williamr@4
|
363 |
Therefore, when reading through a file, the end of file has been reached
|
williamr@4
|
364 |
when the descriptor length, as returned by TDesC8::Length(), is zero.
|
williamr@4
|
365 |
Assuming aLength is less than the maximum length of the descriptor, the only
|
williamr@4
|
366 |
circumstances in which Read() can return fewer bytes than requested is when
|
williamr@4
|
367 |
the end of file is reached or if an error has occurred.
|
williamr@4
|
368 |
|
williamr@4
|
369 |
Note:
|
williamr@4
|
370 |
1. This function over-rides the base class function RFile::Read
|
williamr@4
|
371 |
and inlines the base class RFile::Read.
|
williamr@4
|
372 |
2. The difference is that this function can read beyond 2GB - 1 when
|
williamr@4
|
373 |
aPos + aLength is beyond 2GB - 1.
|
williamr@4
|
374 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
375 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
376 |
this function becomes a private overload and hence use of
|
williamr@4
|
377 |
void RFile64::Read(TInt64 aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const is recommended.
|
williamr@4
|
378 |
|
williamr@4
|
379 |
@see void RFile::Read(TInt aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const
|
williamr@4
|
380 |
@see void RFile64::Read(TInt64 aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const
|
williamr@4
|
381 |
|
williamr@4
|
382 |
@param aPos Position of first byte to be read. This is an offset from
|
williamr@4
|
383 |
the start of the file. If no position is specified,
|
williamr@4
|
384 |
reading begins at the current file position.
|
williamr@4
|
385 |
If aPos is beyond the end of the file, the function returns
|
williamr@4
|
386 |
a zero length descriptor.
|
williamr@4
|
387 |
|
williamr@4
|
388 |
@param aDes The descriptor into which binary data is read. Any existing
|
williamr@4
|
389 |
contents are overwritten. On return, its length is set to
|
williamr@4
|
390 |
the number of bytes read.
|
williamr@4
|
391 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
392 |
represents may not complete until some time after the call
|
williamr@4
|
393 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
394 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
395 |
been notified that the request is complete.
|
williamr@4
|
396 |
|
williamr@4
|
397 |
@param aLength The number of bytes to read from the file into the descriptor.
|
williamr@4
|
398 |
If an attempt is made to read more bytes than the descriptor's
|
williamr@4
|
399 |
maximum length, then the function returns KErrOverflow.
|
williamr@4
|
400 |
It must not be negative otherwise the function returns KErrArgument.
|
williamr@4
|
401 |
|
williamr@4
|
402 |
@param aStatus Request status. On completion contains KErrNone if successful,
|
williamr@4
|
403 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
404 |
|
williamr@4
|
405 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
406 |
*/
|
williamr@4
|
407 |
inline void RFile64::Read(TInt aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const
|
williamr@4
|
408 |
{ RFile::Read(aPos, aDes, aLength, aStatus);}
|
williamr@4
|
409 |
|
williamr@4
|
410 |
/**
|
williamr@4
|
411 |
Writes to the file at the specified offset within the file
|
williamr@4
|
412 |
|
williamr@4
|
413 |
This is a synchronous function.
|
williamr@4
|
414 |
|
williamr@4
|
415 |
Note:
|
williamr@4
|
416 |
1. This function over-rides the base class function RFile::Write
|
williamr@4
|
417 |
and inlines the base class RFile::Write.
|
williamr@4
|
418 |
2. The difference is that this function can write beyond 2GB - 1 when
|
williamr@4
|
419 |
aPos + length of aDes is beyond 2GB - 1.
|
williamr@4
|
420 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
421 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
422 |
this function becomes a private overload and hence use of
|
williamr@4
|
423 |
TInt RFile64::Write(TInt64 aPos,const TDesC8& aDes) is recommended.
|
williamr@4
|
424 |
|
williamr@4
|
425 |
@see TInt RFile::Write(TInt aPos,const TDesC8& aDes)
|
williamr@4
|
426 |
@see TInt RFile64::Write(TInt64 aPos,const TDesC8& aDes)
|
williamr@4
|
427 |
|
williamr@4
|
428 |
@param aPos The offset from the start of the file at which the first
|
williamr@4
|
429 |
byte is written.
|
williamr@4
|
430 |
If a position beyond the end of the file is specified, then
|
williamr@4
|
431 |
the write operation begins at the end of the file.
|
williamr@4
|
432 |
If the position has been locked, then the write fails.
|
williamr@4
|
433 |
|
williamr@4
|
434 |
@param aDes The descriptor from which binary data is written. The function writes
|
williamr@4
|
435 |
the entire contents of aDes to the file.
|
williamr@4
|
436 |
|
williamr@4
|
437 |
@return KErrNone if successful, otherwise one of the other system-wide error
|
williamr@4
|
438 |
codes.
|
williamr@4
|
439 |
|
williamr@4
|
440 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
441 |
*/
|
williamr@4
|
442 |
inline TInt RFile64::Write(TInt aPos,const TDesC8& aDes)
|
williamr@4
|
443 |
{return RFile::Write( aPos, aDes);}
|
williamr@4
|
444 |
|
williamr@4
|
445 |
/**
|
williamr@4
|
446 |
Writes to the file at the specified offset within the file
|
williamr@4
|
447 |
|
williamr@4
|
448 |
This is an asynchronous function.
|
williamr@4
|
449 |
|
williamr@4
|
450 |
Note:
|
williamr@4
|
451 |
1. This function over-rides the base class function RFile::Write
|
williamr@4
|
452 |
and inlines the base class RFile::Write.
|
williamr@4
|
453 |
2. The difference is that this function can write beyond 2GB - 1 when
|
williamr@4
|
454 |
aPos + length of aDes is beyond 2GB - 1.
|
williamr@4
|
455 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
456 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
457 |
this function becomes a private overload and hence use of
|
williamr@4
|
458 |
void RFile64::Write(TInt64 aPos,const TDesC8& aDes,TRequestStatus& aStatus) is recommended.
|
williamr@4
|
459 |
|
williamr@4
|
460 |
@see void RFile::Write(TInt aPos,const TDesC8& aDes,TRequestStatus& aStatus)
|
williamr@4
|
461 |
@see void RFile64::Write(TInt64 aPos,const TDesC8& aDes,TRequestStatus& aStatus)
|
williamr@4
|
462 |
|
williamr@4
|
463 |
@param aPos The offset from the start of the file at which the first
|
williamr@4
|
464 |
byte is written.
|
williamr@4
|
465 |
If a position beyond the end of the file is specified, then
|
williamr@4
|
466 |
the write operation begins at the end of the file.
|
williamr@4
|
467 |
If the position has been locked, then the write fails.
|
williamr@4
|
468 |
|
williamr@4
|
469 |
@param aDes The descriptor from which binary data is written. The function
|
williamr@4
|
470 |
writes the entire contents of aDes to the file.
|
williamr@4
|
471 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
472 |
represents may not complete until some time after the call
|
williamr@4
|
473 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
474 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
475 |
been notified that the request is complete.
|
williamr@4
|
476 |
|
williamr@4
|
477 |
@param aStatus Request status. On completion contains KErrNone if successful,
|
williamr@4
|
478 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
479 |
|
williamr@4
|
480 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
481 |
*/
|
williamr@4
|
482 |
inline void RFile64::Write(TInt aPos,const TDesC8& aDes,TRequestStatus& aStatus)
|
williamr@4
|
483 |
{RFile::Write(aPos, aDes, aStatus);}
|
williamr@4
|
484 |
|
williamr@4
|
485 |
/**
|
williamr@4
|
486 |
Writes the specified number of bytes to the file at the specified offset within the file.
|
williamr@4
|
487 |
|
williamr@4
|
488 |
This is a synchronous function.
|
williamr@4
|
489 |
|
williamr@4
|
490 |
Note:
|
williamr@4
|
491 |
1. This function over-rides the base class function RFile::Write
|
williamr@4
|
492 |
and inlines the base class RFile::Write.
|
williamr@4
|
493 |
2. The difference is that this function can write beyond 2GB - 1 when
|
williamr@4
|
494 |
aPos + aLength is beyond 2GB - 1.
|
williamr@4
|
495 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
496 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
497 |
this function becomes a private overload and hence use of
|
williamr@4
|
498 |
TInt RFile64::Write(TInt64 aPos,const TDesC8& aDes,TInt aLength) is recommended.
|
williamr@4
|
499 |
|
williamr@4
|
500 |
@see TInt RFile::Write(TInt aPos,const TDesC8& aDes,TInt aLength)
|
williamr@4
|
501 |
@see TInt RFile64::Write(TInt64 aPos,const TDesC8& aDes,TInt aLength)
|
williamr@4
|
502 |
|
williamr@4
|
503 |
@param aPos The offset from the start of the file at which the first
|
williamr@4
|
504 |
byte is written.
|
williamr@4
|
505 |
If a position beyond the end of the file is specified, then
|
williamr@4
|
506 |
the write operation begins at the end of the file.
|
williamr@4
|
507 |
If the position has been locked, then the write fails.
|
williamr@4
|
508 |
|
williamr@4
|
509 |
@param aDes The descriptor from which binary data is written.
|
williamr@4
|
510 |
@param aLength The number of bytes to be written from aDes .
|
williamr@4
|
511 |
It must not be negative.
|
williamr@4
|
512 |
|
williamr@4
|
513 |
@return KErrNone if successful; KErrArgument if aLength is negative;
|
williamr@4
|
514 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
515 |
|
williamr@4
|
516 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
517 |
*/
|
williamr@4
|
518 |
inline TInt RFile64::Write(TInt aPos,const TDesC8& aDes,TInt aLength)
|
williamr@4
|
519 |
{return RFile::Write(aPos, aDes, aLength);}
|
williamr@4
|
520 |
|
williamr@4
|
521 |
/**
|
williamr@4
|
522 |
Writes the specified number of bytes to the file at the specified offset within the file.
|
williamr@4
|
523 |
|
williamr@4
|
524 |
This is an asynchronous function.
|
williamr@4
|
525 |
|
williamr@4
|
526 |
Note:
|
williamr@4
|
527 |
1. This function over-rides the base class function RFile::Write
|
williamr@4
|
528 |
and inlines the base class RFile::Write.
|
williamr@4
|
529 |
2. The difference is that this function can write beyond 2GB - 1 when
|
williamr@4
|
530 |
aPos + aLength is beyond 2GB - 1.
|
williamr@4
|
531 |
3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro
|
williamr@4
|
532 |
to help migration to 64 bit file addressing. When the macro is defined,
|
williamr@4
|
533 |
this function becomes a private overload and hence use of
|
williamr@4
|
534 |
void RFile64::Write(TInt64 aPos,const TDesC8& aDes,TRequestStatus& aStatus) is recommended.
|
williamr@4
|
535 |
|
williamr@4
|
536 |
@see void RFile::Write(TInt aPos,const TDesC8& aDes,TRequestStatus& aStatus)
|
williamr@4
|
537 |
@see void RFile64::Write(TInt64 aPos,const TDesC8& aDes,TRequestStatus& aStatus)
|
williamr@4
|
538 |
|
williamr@4
|
539 |
@param aPos The offset from the start of the file at which the first
|
williamr@4
|
540 |
byte is written.
|
williamr@4
|
541 |
If a position beyond the end of the file is specified, then
|
williamr@4
|
542 |
the write operation begins at the end of the file.
|
williamr@4
|
543 |
If the position has been locked, then the write fails.
|
williamr@4
|
544 |
|
williamr@4
|
545 |
@param aDes The descriptor from which binary data is written.
|
williamr@4
|
546 |
NB: this function is asynchronous and the request that it
|
williamr@4
|
547 |
represents may not complete until some time after the call
|
williamr@4
|
548 |
to the function has returned. It is important, therefore, that
|
williamr@4
|
549 |
this descriptor remain valid, or remain in scope, until you have
|
williamr@4
|
550 |
been notified that the request is complete.
|
williamr@4
|
551 |
|
williamr@4
|
552 |
@param aLength The number of bytes to be written from aDes.
|
williamr@4
|
553 |
It must not be negative.
|
williamr@4
|
554 |
|
williamr@4
|
555 |
@param aStatus Request status. On completion contains KErrNone if successful;
|
williamr@4
|
556 |
KErrArgument if aLength is negative;
|
williamr@4
|
557 |
otherwise one of the other system-wide error codes.
|
williamr@4
|
558 |
|
williamr@4
|
559 |
@panic FSCLIENT 19 if aPos is negative.
|
williamr@4
|
560 |
*/
|
williamr@4
|
561 |
inline void RFile64::Write(TInt aPos,const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus)
|
williamr@4
|
562 |
{RFile::Write(aPos, aDes, aLength, aStatus);}
|