persistentstorage/store/INC/S32FILE.INL
changeset 25 63532cdadd44
parent 0 08ec8eefde2f
child 29 cce6680bbf1c
--- a/persistentstorage/store/INC/S32FILE.INL	Thu May 27 14:29:47 2010 +0300
+++ b/persistentstorage/store/INC/S32FILE.INL	Fri Jun 11 15:29:22 2010 +0300
@@ -290,7 +290,11 @@
 @param aFs Handle to a file server session.
 @param aName The full path name of the file containing the store. 
 @param aFileMode The mode in which the file is to be accessed. The mode is 
-defined by the TFileMode type.
+defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO
+bit. It is because that When the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 @return A pointer to the new permanent file store object.
 @see TFileMode */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenL(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));}
@@ -301,7 +305,11 @@
 @param aFs Handle to a file server session. 
 @param aName The full path name of the file containing the store. 
 @param aFileMode The mode in which the file is to be accessed. The mode is 
-defined by the TFileMode type.
+defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO
+bit. It is because that When the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 @return A pointer to the new permanent file store object.
 @see TFileMode */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::OpenLC(aFs,aName,aFileMode,KPermanentFileStoreFactoryFunction));}
@@ -313,7 +321,11 @@
 @param aName The full path name of the new file. A file with this name must 
 not already exist, otherwise the function leaves.
 @param aFileMode The mode in which the new file is to be accessed. This mode 
-is defined by the TFileMode type.
+is defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO
+bit. It is because that When the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 @return A pointer to the new permanent file store object.
 @see TFileMode */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateL(aFs,aName,aFileMode,&DoNewL));}
@@ -325,7 +337,11 @@
 @param aName The full path name of the new file. A file with this name must 
 not already exist, otherwise the function leaves.
 @param aFileMode The mode in which the new file is to be accessed. This mode 
-is defined by the TFileMode type.
+is defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO
+bit. It is because that when the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 @return A pointer to the new permanent file store object. 
 @see TFileMode */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::CreateLC(aFs,aName,aFileMode,&DoNewL));}
@@ -338,7 +354,11 @@
 @param aFs Handle to a file server session. 
 @param aName The full path name of the file to be replaced.
 @param aFileMode The mode in which the file is to be accessed. The mode is 
-defined by the TFileMode type.
+defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO
+bit. It is because that when the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 @return A pointer to the new permanent file store object.
 @see TFileMode */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceL(aFs,aName,aFileMode,&DoNewL));}
@@ -351,7 +371,11 @@
 @param aFs Handle to a file server session. 
 @param aName The full path name of the file to be replaced.
 @param aFileMode The mode in which the file is to be accessed. The mode is 
-defined by the TFileMode type.
+defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO
+bit. It is because that when the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 @return A pointer to the new permanent file store object. 
 @see TFileMode */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::ReplaceLC(aFs,aName,aFileMode,&DoNewL));}
@@ -387,18 +411,27 @@
 @param aPath The path where the new file is to be created.
 @param aName On return, contains the full path name of the new file.
 @param aFileMode The mode in which the file is to be accessed. The mode is 
-defined by the TFileMode type.
+defined by the TFileMode type. It is strongly recommended to set EFileWriteDirectIO
+bit. It is because that When the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 @return A pointer to the new permanent file store object.
 @see TFileMode */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::TempLC(aFs,aPath,aName,aFileMode,&DoNewL));}
 inline CPermanentFileStore* CPermanentFileStore::FromL(RFile& aFile)
-/** Constructs a permanent file store object from an already opened file.
+/** Constructs a permanent file store object from an already opened file. It is strongly recommended to set EFileWriteDirectIO
+bit when opening the file. It is because that when the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 
 The file must already be open before calling this function.
 
 Note that ownership of the file passes to the store. The referenced RFile 
 is cleared and is no longer valid.
 
+
 @param aFile A reference to the opened file. 
 @return A pointer to the new permanent file store object. */
 	{return STATIC_CAST(CPermanentFileStore*,CFileStore::FromL(aFile,KPermanentFileStoreFactoryFunction));}
@@ -406,7 +439,11 @@
 /** Constructs a permanent file store object from an already opened file, and places 
 the pointer onto the cleanup stack.
 
-The file must already be open before calling this function.
+The file must already be open before calling this function. It is strongly recommended to set EFileWriteDirectIO
+bit when opening the file. It is because that when the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 
 Note that ownership of the file passes to the store. The referenced RFile 
 is cleared and is no longer valid.
@@ -418,7 +455,11 @@
 /** Constructs a new permanent file store object in an already opened file.
 
 The file must already be open before calling this function. The existing content 
-of the file is discarded.
+of the file is discarded. It is strongly recommended to set EFileWriteDirectIO
+bit when opening the file. It is because that when the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 
 Note that ownership of the file passes to the store. The referenced RFile 
 is cleared and is no longer valid.
@@ -431,7 +472,11 @@
 places the pointer onto the cleanup stack.
 
 The file must already be open before calling this function.The existing content 
-of the file is discarded.
+of the file is discarded. It is strongly recommended to set EFileWriteDirectIO
+bit when opening the file. It is because that when the file cache in file server is on, the
+order of file writing is not guaranteed which could cause data inconsistency in some
+circumstances, for example, when the power is lost in the middle of data transaction.
+Therefore, the file write cache should be switched off to maintain the file integrity.
 
 Note that ownership of the file passes to the store. The referenced RFile 
 is cleared and is no longer valid.