376 This file replaces any existing file of the same name. |
376 This file replaces any existing file of the same name. |
377 |
377 |
378 @param aFs Handle to a file server session. |
378 @param aFs Handle to a file server session. |
379 @param aName The full path name of the file to be replaced. |
379 @param aName The full path name of the file to be replaced. |
380 @param aFileMode The mode in which the file is to be accessed. The mode is |
380 @param aFileMode The mode in which the file is to be accessed. The mode is |
381 defined by the TFileMode type. |
381 defined by the TFileMode type. |
382 @return A pointer to the new permanent file store object. |
382 @return A pointer to the new permanent file store object. |
383 @see TFileMode */ |
383 @see TFileMode */ |
384 { |
384 { |
385 // When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances, |
385 // When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances, |
386 // for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity. |
386 // for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity. |
399 This file replaces any existing file of the same name. |
399 This file replaces any existing file of the same name. |
400 |
400 |
401 @param aFs Handle to a file server session. |
401 @param aFs Handle to a file server session. |
402 @param aName The full path name of the file to be replaced. |
402 @param aName The full path name of the file to be replaced. |
403 @param aFileMode The mode in which the file is to be accessed. The mode is |
403 @param aFileMode The mode in which the file is to be accessed. The mode is |
404 defined by the TFileMode type. |
404 defined by the TFileMode type. |
405 @return A pointer to the new permanent file store object. |
405 @return A pointer to the new permanent file store object. |
406 @see TFileMode */ |
406 @see TFileMode */ |
407 { |
407 { |
408 // When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances, |
408 // When the file server write caching is enabled, the order of file write operations is not guaranteed. This could cause data inconsistency in some circumstances, |
409 // for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity. |
409 // for example, when the power is lost in the middle of a database transaction. Therefore, the file write caching is disabled for this file to maintain integrity. |
475 /** Constructs a permanent file store object from an already opened file. It is strongly recommended to set EFileWriteDirectIO |
475 /** Constructs a permanent file store object from an already opened file. It is strongly recommended to set EFileWriteDirectIO |
476 bit when opening the file. This is because that when the file server write caching is enabled, the |
476 bit when opening the file. This is because that when the file server write caching is enabled, the |
477 order of file write operations is not guaranteed. This could cause data inconsistency in some |
477 order of file write operations is not guaranteed. This could cause data inconsistency in some |
478 circumstances, for example, when the power is lost in the middle of database transaction. |
478 circumstances, for example, when the power is lost in the middle of database transaction. |
479 Therefore, the file write caching should be switched off to maintain integrity. |
479 Therefore, the file write caching should be switched off to maintain integrity. |
|
480 |
|
481 |
480 |
482 |
481 The file must already be open before calling this function. |
483 The file must already be open before calling this function. |
482 |
484 |
483 Note that ownership of the file passes to the store. The referenced RFile |
485 Note that ownership of the file passes to the store. The referenced RFile |
484 is cleared and is no longer valid. |
486 is cleared and is no longer valid. |
506 inline CPermanentFileStore* CPermanentFileStore::NewL(RFile& aFile) |
508 inline CPermanentFileStore* CPermanentFileStore::NewL(RFile& aFile) |
507 /** Constructs a new permanent file store object in an already opened file. |
509 /** Constructs a new permanent file store object in an already opened file. |
508 |
510 |
509 The file must already be open before calling this function. The existing content |
511 The file must already be open before calling this function. The existing content |
510 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO |
512 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO |
511 bit when opening the file. It is because that when file server file write cachingis on, the |
513 bit when opening the file. It is because that when the file write caching in file server is on, the |
512 order of file writing is not guaranteed which could cause data inconsistency in some |
514 order of file writing is not guaranteed which could cause data inconsistency in some |
513 circumstances, for example, when the power is lost in the middle of data transaction. |
515 circumstances, for example, when the power is lost in the middle of data transaction. |
514 Therefore, the file write caching should be switched off to maintain the file integrity. |
516 Therefore, the file write caching should be switched off to maintain the file integrity. |
515 |
517 |
516 Note that ownership of the file passes to the store. The referenced RFile |
518 Note that ownership of the file passes to the store. The referenced RFile |
523 /** Constructs a new permanent file store object in an already opened file and |
525 /** Constructs a new permanent file store object in an already opened file and |
524 places the pointer onto the cleanup stack. |
526 places the pointer onto the cleanup stack. |
525 |
527 |
526 The file must already be open before calling this function.The existing content |
528 The file must already be open before calling this function.The existing content |
527 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO |
529 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO |
528 bit when opening the file. It is because that when the file write caching in file server is on, the |
530 bit when opening the file. It is because that when the write caching in file server is on, the |
529 order of file writing is not guaranteed which could cause data inconsistency in some |
531 order of file writing is not guaranteed which could cause data inconsistency in some |
530 circumstances, for example, when the power is lost in the middle of data transaction. |
532 circumstances, for example, when the power is lost in the middle of data transaction. |
531 Therefore, the file file write caching should be switched off to maintain the file integrity. |
533 Therefore, the file write caching should be switched off to maintain the file integrity. |
532 |
534 |
533 Note that ownership of the file passes to the store. The referenced RFile |
535 Note that ownership of the file passes to the store. The referenced RFile |
534 is cleared and is no longer valid. |
536 is cleared and is no longer valid. |
535 |
537 |
536 @param aFile A reference to the opened file. |
538 @param aFile A reference to the opened file. |