persistentstorage/store/INC/S32FILE.INL
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
equal deleted inserted replaced
23:26645d81f48d 24:cc28652e0254
   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 
       
   482 
   480 
   483 The file must already be open before calling this function.
   481 The file must already be open before calling this function.
   484 
   482 
   485 Note that ownership of the file passes to the store. The referenced RFile 
   483 Note that ownership of the file passes to the store. The referenced RFile 
   486 is cleared and is no longer valid.
   484 is cleared and is no longer valid.
   508 inline CPermanentFileStore* CPermanentFileStore::NewL(RFile& aFile)
   506 inline CPermanentFileStore* CPermanentFileStore::NewL(RFile& aFile)
   509 /** Constructs a new permanent file store object in an already opened file.
   507 /** Constructs a new permanent file store object in an already opened file.
   510 
   508 
   511 The file must already be open before calling this function. The existing content 
   509 The file must already be open before calling this function. The existing content 
   512 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO
   510 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO
   513 bit when opening the file. It is because that when the file write caching in file server is on, the
   511 bit when opening the file. It is because that when file server file write cachingis on, the
   514 order of file writing is not guaranteed which could cause data inconsistency in some
   512 order of file writing is not guaranteed which could cause data inconsistency in some
   515 circumstances, for example, when the power is lost in the middle of data transaction.
   513 circumstances, for example, when the power is lost in the middle of data transaction.
   516 Therefore, the file write caching should be switched off to maintain the file integrity.
   514 Therefore, the file write caching should be switched off to maintain the file integrity.
   517 
   515 
   518 Note that ownership of the file passes to the store. The referenced RFile 
   516 Note that ownership of the file passes to the store. The referenced RFile 
   525 /** Constructs a new permanent file store object in an already opened file and 
   523 /** Constructs a new permanent file store object in an already opened file and 
   526 places the pointer onto the cleanup stack.
   524 places the pointer onto the cleanup stack.
   527 
   525 
   528 The file must already be open before calling this function.The existing content 
   526 The file must already be open before calling this function.The existing content 
   529 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO
   527 of the file is discarded. It is strongly recommended to set EFileWriteDirectIO
   530 bit when opening the file. It is because that when the write caching in file server is on, the
   528 bit when opening the file. It is because that when the file write caching in file server is on, the
   531 order of file writing is not guaranteed which could cause data inconsistency in some
   529 order of file writing is not guaranteed which could cause data inconsistency in some
   532 circumstances, for example, when the power is lost in the middle of data transaction.
   530 circumstances, for example, when the power is lost in the middle of data transaction.
   533 Therefore, the file write caching should be switched off to maintain the file integrity.
   531 Therefore, the file file write caching should be switched off to maintain the file integrity.
   534 
   532 
   535 Note that ownership of the file passes to the store. The referenced RFile 
   533 Note that ownership of the file passes to the store. The referenced RFile 
   536 is cleared and is no longer valid.
   534 is cleared and is no longer valid.
   537 
   535 
   538 @param aFile A reference to the opened file. 
   536 @param aFile A reference to the opened file.