288 file store object. |
288 file store object. |
289 |
289 |
290 @param aFs Handle to a file server session. |
290 @param aFs Handle to a file server session. |
291 @param aName The full path name of the file containing the store. |
291 @param aName The full path name of the file containing the store. |
292 @param aFileMode The mode in which the file is to be accessed. The mode is |
292 @param aFileMode The mode in which the file is to be accessed. The mode is |
293 defined by the TFileMode type. |
293 defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO |
|
294 bit. It is because that When the file cache in file server is on, the |
|
295 order of file writing is not guaranteed which could cause data inconsistency in some |
|
296 circumstances, for example, when the power is lost in the middle of data transaction. |
|
297 Therefore, the file write cache should be switched off to maintain the file integrity. |
294 @return A pointer to the new permanent file store object. |
298 @return A pointer to the new permanent file store object. |
295 @see TFileMode */ |
299 @see TFileMode */ |
296 {return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenL(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));} |
300 {return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenL(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));} |
297 inline CPermanentFileStore* CPermanentFileStore::OpenLC(RFs& aFs,const TDesC& aName,TUint aFileMode) |
301 inline CPermanentFileStore* CPermanentFileStore::OpenLC(RFs& aFs,const TDesC& aName,TUint aFileMode) |
298 /** Opens a file containing a permanent file store, constructs a permanent file |
302 /** Opens a file containing a permanent file store, constructs a permanent file |
299 store object, and places the pointer onto the cleanup stack. |
303 store object, and places the pointer onto the cleanup stack. |
300 |
304 |
301 @param aFs Handle to a file server session. |
305 @param aFs Handle to a file server session. |
302 @param aName The full path name of the file containing the store. |
306 @param aName The full path name of the file containing the store. |
303 @param aFileMode The mode in which the file is to be accessed. The mode is |
307 @param aFileMode The mode in which the file is to be accessed. The mode is |
304 defined by the TFileMode type. |
308 defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO |
|
309 bit. It is because that When the file cache in file server is on, the |
|
310 order of file writing is not guaranteed which could cause data inconsistency in some |
|
311 circumstances, for example, when the power is lost in the middle of data transaction. |
|
312 Therefore, the file write cache should be switched off to maintain the file integrity. |
305 @return A pointer to the new permanent file store object. |
313 @return A pointer to the new permanent file store object. |
306 @see TFileMode */ |
314 @see TFileMode */ |
307 {return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenLC(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));} |
315 {return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenLC(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));} |
308 inline CPermanentFileStore* CPermanentFileStore::CreateL(RFs& aFs,const TDesC& aName,TUint aFileMode) |
316 inline CPermanentFileStore* CPermanentFileStore::CreateL(RFs& aFs,const TDesC& aName,TUint aFileMode) |
309 /** Creates a new file and constructs a new permanent file store object to be associated |
317 /** Creates a new file and constructs a new permanent file store object to be associated |
311 |
319 |
312 @param aFs Handle to a file server session. |
320 @param aFs Handle to a file server session. |
313 @param aName The full path name of the new file. A file with this name must |
321 @param aName The full path name of the new file. A file with this name must |
314 not already exist, otherwise the function leaves. |
322 not already exist, otherwise the function leaves. |
315 @param aFileMode The mode in which the new file is to be accessed. This mode |
323 @param aFileMode The mode in which the new file is to be accessed. This mode |
316 is defined by the TFileMode type. |
324 is defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO |
|
325 bit. It is because that When the file cache in file server is on, the |
|
326 order of file writing is not guaranteed which could cause data inconsistency in some |
|
327 circumstances, for example, when the power is lost in the middle of data transaction. |
|
328 Therefore, the file write cache should be switched off to maintain the file integrity. |
317 @return A pointer to the new permanent file store object. |
329 @return A pointer to the new permanent file store object. |
318 @see TFileMode */ |
330 @see TFileMode */ |
319 {return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateL(aFs,aName,aFileMode,&DoNewL));} |
331 {return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateL(aFs,aName,aFileMode,&DoNewL));} |
320 inline CPermanentFileStore* CPermanentFileStore::CreateLC(RFs& aFs,const TDesC& aName,TUint aFileMode) |
332 inline CPermanentFileStore* CPermanentFileStore::CreateLC(RFs& aFs,const TDesC& aName,TUint aFileMode) |
321 /** Creates a new file and constructs a new permanent file store object to be associated |
333 /** Creates a new file and constructs a new permanent file store object to be associated |
323 |
335 |
324 @param aFs Handle to a file server session. |
336 @param aFs Handle to a file server session. |
325 @param aName The full path name of the new file. A file with this name must |
337 @param aName The full path name of the new file. A file with this name must |
326 not already exist, otherwise the function leaves. |
338 not already exist, otherwise the function leaves. |
327 @param aFileMode The mode in which the new file is to be accessed. This mode |
339 @param aFileMode The mode in which the new file is to be accessed. This mode |
328 is defined by the TFileMode type. |
340 is defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO |
|
341 bit. It is because that when the file cache in file server is on, the |
|
342 order of file writing is not guaranteed which could cause data inconsistency in some |
|
343 circumstances, for example, when the power is lost in the middle of data transaction. |
|
344 Therefore, the file write cache should be switched off to maintain the file integrity. |
329 @return A pointer to the new permanent file store object. |
345 @return A pointer to the new permanent file store object. |
330 @see TFileMode */ |
346 @see TFileMode */ |
331 {return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateLC(aFs,aName,aFileMode,&DoNewL));} |
347 {return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateLC(aFs,aName,aFileMode,&DoNewL));} |
332 inline CPermanentFileStore* CPermanentFileStore::ReplaceL(RFs& aFs,const TDesC& aName,TUint aFileMode) |
348 inline CPermanentFileStore* CPermanentFileStore::ReplaceL(RFs& aFs,const TDesC& aName,TUint aFileMode) |
333 /** Creates a file, constructs a permanent file store object to be associated with |
349 /** Creates a file, constructs a permanent file store object to be associated with |
336 This file replaces any existing file of the same name. |
352 This file replaces any existing file of the same name. |
337 |
353 |
338 @param aFs Handle to a file server session. |
354 @param aFs Handle to a file server session. |
339 @param aName The full path name of the file to be replaced. |
355 @param aName The full path name of the file to be replaced. |
340 @param aFileMode The mode in which the file is to be accessed. The mode is |
356 @param aFileMode The mode in which the file is to be accessed. The mode is |
341 defined by the TFileMode type. |
357 defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO |
|
358 bit. It is because that when the file cache in file server is on, the |
|
359 order of file writing is not guaranteed which could cause data inconsistency in some |
|
360 circumstances, for example, when the power is lost in the middle of data transaction. |
|
361 Therefore, the file write cache should be switched off to maintain the file integrity. |
342 @return A pointer to the new permanent file store object. |
362 @return A pointer to the new permanent file store object. |
343 @see TFileMode */ |
363 @see TFileMode */ |
344 {return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceL(aFs,aName,aFileMode,&DoNewL));} |
364 {return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceL(aFs,aName,aFileMode,&DoNewL));} |
345 inline CPermanentFileStore* CPermanentFileStore::ReplaceLC(RFs& aFs,const TDesC& aName,TUint aFileMode) |
365 inline CPermanentFileStore* CPermanentFileStore::ReplaceLC(RFs& aFs,const TDesC& aName,TUint aFileMode) |
346 /** Creates a file, constructs a permanent file store object to be associated with |
366 /** Creates a file, constructs a permanent file store object to be associated with |
349 This file replaces any existing file of the same name. |
369 This file replaces any existing file of the same name. |
350 |
370 |
351 @param aFs Handle to a file server session. |
371 @param aFs Handle to a file server session. |
352 @param aName The full path name of the file to be replaced. |
372 @param aName The full path name of the file to be replaced. |
353 @param aFileMode The mode in which the file is to be accessed. The mode is |
373 @param aFileMode The mode in which the file is to be accessed. The mode is |
354 defined by the TFileMode type. |
374 defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO |
|
375 bit. It is because that when the file cache in file server is on, the |
|
376 order of file writing is not guaranteed which could cause data inconsistency in some |
|
377 circumstances, for example, when the power is lost in the middle of data transaction. |
|
378 Therefore, the file write cache should be switched off to maintain the file integrity. |
355 @return A pointer to the new permanent file store object. |
379 @return A pointer to the new permanent file store object. |
356 @see TFileMode */ |
380 @see TFileMode */ |
357 {return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceLC(aFs,aName,aFileMode,&DoNewL));} |
381 {return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceLC(aFs,aName,aFileMode,&DoNewL));} |
358 inline CPermanentFileStore* CPermanentFileStore::TempL(RFs& aFs,const TDesC& aPath,TFileName& aName,TUint aFileMode) |
382 inline CPermanentFileStore* CPermanentFileStore::TempL(RFs& aFs,const TDesC& aPath,TFileName& aName,TUint aFileMode) |
359 /** Creates a temporary file and constructs a permanent file store object to be |
383 /** Creates a temporary file and constructs a permanent file store object to be |
385 |
409 |
386 @param aFs Handle to a file server session. |
410 @param aFs Handle to a file server session. |
387 @param aPath The path where the new file is to be created. |
411 @param aPath The path where the new file is to be created. |
388 @param aName On return, contains the full path name of the new file. |
412 @param aName On return, contains the full path name of the new file. |
389 @param aFileMode The mode in which the file is to be accessed. The mode is |
413 @param aFileMode The mode in which the file is to be accessed. The mode is |
390 defined by the TFileMode type. |
414 defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO |
|
415 bit. It is because that When the file cache in file server is on, the |
|
416 order of file writing is not guaranteed which could cause data inconsistency in some |
|
417 circumstances, for example, when the power is lost in the middle of data transaction. |
|
418 Therefore, the file write cache should be switched off to maintain the file integrity. |
391 @return A pointer to the new permanent file store object. |
419 @return A pointer to the new permanent file store object. |
392 @see TFileMode */ |
420 @see TFileMode */ |
393 {return STATIC_CAST(CPermanentFileStore*,CFileStore::TempLC(aFs,aPath,aName,aFileMode,&DoNewL));} |
421 {return STATIC_CAST(CPermanentFileStore*,CFileStore::TempLC(aFs,aPath,aName,aFileMode,&DoNewL));} |
394 inline CPermanentFileStore* CPermanentFileStore::FromL(RFile& aFile) |
422 inline CPermanentFileStore* CPermanentFileStore::FromL(RFile& aFile) |
395 /** Constructs a permanent file store object from an already opened file. |
423 /** Constructs a permanent file store object from an already opened file. It is strongly recommended to set EFileWriteDirectIO |
|
424 bit when opening the file. It is because that when the file cache in file server is on, the |
|
425 order of file writing is not guaranteed which could cause data inconsistency in some |
|
426 circumstances, for example, when the power is lost in the middle of data transaction. |
|
427 Therefore, the file write cache should be switched off to maintain the file integrity. |
396 |
428 |
397 The file must already be open before calling this function. |
429 The file must already be open before calling this function. |
398 |
430 |
399 Note that ownership of the file passes to the store. The referenced RFile |
431 Note that ownership of the file passes to the store. The referenced RFile |
400 is cleared and is no longer valid. |
432 is cleared and is no longer valid. |
|
433 |
401 |
434 |
402 @param aFile A reference to the opened file. |
435 @param aFile A reference to the opened file. |
403 @return A pointer to the new permanent file store object. */ |
436 @return A pointer to the new permanent file store object. */ |
404 {return STATIC_CAST(CPermanentFileStore*,CFileStore::FromL(aFile,KPermanentFileStoreFactoryFunction));} |
437 {return STATIC_CAST(CPermanentFileStore*,CFileStore::FromL(aFile,KPermanentFileStoreFactoryFunction));} |
405 inline CPermanentFileStore* CPermanentFileStore::FromLC(RFile& aFile) |
438 inline CPermanentFileStore* CPermanentFileStore::FromLC(RFile& aFile) |
406 /** Constructs a permanent file store object from an already opened file, and places |
439 /** Constructs a permanent file store object from an already opened file, and places |
407 the pointer onto the cleanup stack. |
440 the pointer onto the cleanup stack. |
408 |
441 |
409 The file must already be open before calling this function. |
442 The file must already be open before calling this function. It is strongly recommended to set EFileWriteDirectIO |
|
443 bit when opening the file. It is because that when the file cache in file server is on, the |
|
444 order of file writing is not guaranteed which could cause data inconsistency in some |
|
445 circumstances, for example, when the power is lost in the middle of data transaction. |
|
446 Therefore, the file write cache should be switched off to maintain the file integrity. |
410 |
447 |
411 Note that ownership of the file passes to the store. The referenced RFile |
448 Note that ownership of the file passes to the store. The referenced RFile |
412 is cleared and is no longer valid. |
449 is cleared and is no longer valid. |
413 |
450 |
414 @param aFile A reference to the opened file. |
451 @param aFile A reference to the opened file. |
416 {return STATIC_CAST(CPermanentFileStore*,CFileStore::FromLC(aFile,KPermanentFileStoreFactoryFunction));} |
453 {return STATIC_CAST(CPermanentFileStore*,CFileStore::FromLC(aFile,KPermanentFileStoreFactoryFunction));} |
417 inline CPermanentFileStore* CPermanentFileStore::NewL(RFile& aFile) |
454 inline CPermanentFileStore* CPermanentFileStore::NewL(RFile& aFile) |
418 /** Constructs a new permanent file store object in an already opened file. |
455 /** Constructs a new permanent file store object in an already opened file. |
419 |
456 |
420 The file must already be open before calling this function. The existing content |
457 The file must already be open before calling this function. The existing content |
421 of the file is discarded. |
458 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO |
|
459 bit when opening the file. It is because that when the file cache in file server is on, the |
|
460 order of file writing is not guaranteed which could cause data inconsistency in some |
|
461 circumstances, for example, when the power is lost in the middle of data transaction. |
|
462 Therefore, the file write cache should be switched off to maintain the file integrity. |
422 |
463 |
423 Note that ownership of the file passes to the store. The referenced RFile |
464 Note that ownership of the file passes to the store. The referenced RFile |
424 is cleared and is no longer valid. |
465 is cleared and is no longer valid. |
425 |
466 |
426 @param aFile A reference to the opened file. |
467 @param aFile A reference to the opened file. |
429 inline CPermanentFileStore* CPermanentFileStore::NewLC(RFile& aFile) |
470 inline CPermanentFileStore* CPermanentFileStore::NewLC(RFile& aFile) |
430 /** Constructs a new permanent file store object in an already opened file and |
471 /** Constructs a new permanent file store object in an already opened file and |
431 places the pointer onto the cleanup stack. |
472 places the pointer onto the cleanup stack. |
432 |
473 |
433 The file must already be open before calling this function.The existing content |
474 The file must already be open before calling this function.The existing content |
434 of the file is discarded. |
475 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO |
|
476 bit when opening the file. It is because that when the file cache in file server is on, the |
|
477 order of file writing is not guaranteed which could cause data inconsistency in some |
|
478 circumstances, for example, when the power is lost in the middle of data transaction. |
|
479 Therefore, the file write cache should be switched off to maintain the file integrity. |
435 |
480 |
436 Note that ownership of the file passes to the store. The referenced RFile |
481 Note that ownership of the file passes to the store. The referenced RFile |
437 is cleared and is no longer valid. |
482 is cleared and is no longer valid. |
438 |
483 |
439 @param aFile A reference to the opened file. |
484 @param aFile A reference to the opened file. |