persistentstorage/store/UFILE/UF_STOR.CPP
changeset 51 7d4490026038
parent 0 08ec8eefde2f
--- a/persistentstorage/store/UFILE/UF_STOR.CPP	Thu Aug 12 11:53:23 2010 +0100
+++ b/persistentstorage/store/UFILE/UF_STOR.CPP	Mon Sep 27 11:59:56 2010 +0100
@@ -27,7 +27,12 @@
 
 The resulting file store object is of concrete type, i.e. either CDirectFileStore 
 or CPermanentFileStore. The specific type is determined from the layout information 
-held in the file store.
+held in the file store. Note that if the store object is CPermanentFileStore and the file is writable,
+it is strongly recommended to set EFileWriteDirectIO bit in aFileMode. This is because that
+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, for example, when the power  is lost in
+ the middle of database transaction. Therefore, the file write caching should be switched off to maintain integrity.
+
 
 @param aFs Handle to a file server session.
 @param aName The full path name of the file containing the store.
@@ -46,7 +51,12 @@
 
 The resulting file store object is of concrete type, i.e. either CDirectFileStore 
 or CPermanentFileStore. The specific type is determined from the layout information 
-held in the file store.
+held in the file store. Note that if the store object is CPermanentFileStore and the file is writable,
+it is strongly recommended to set EFileWriteDirectIO bit when opening the file. This is because that
+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, for example, when the power  is lost in
+ the middle of database transaction. Therefore, the file write caching should be switched off to maintain integrity.
+
 
 @param aFs Handle to a file server session. 
 @param aName The full path name of the file containing the store. 
@@ -98,6 +108,26 @@
 	return FromLC(aFile,KDefaultFileStoreFactory);
 	}
 
+/** Opens a file containing a store and constructs an appropriate file store object.
+
+The resulting file store object is of concrete type, i.e. either CDirectFileStore 
+or CPermanentFileStore. The specific type is determined from the layout information 
+held in the file store. Note that if the store object is CPermanentFileStore and the file is writable,
+it is strongly recommended to set EFileWriteDirectIO bit in aFileMode. This is because that
+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, for example, when the power  is lost in
+the middle of database transaction. Therefore, the file write caching should be switched off to maintain integrity.
+
+
+@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.
+@param TFileStoreFactoryFunction An array of  file store factory function.
+@return A pointer to the new file store object. 
+@see TFileMode
+@see TFileStoreFactoryFunction
+*/
 EXPORT_C CFileStore* CFileStore::OpenL(RFs& aFs,const TDesC& aName,TUint aFileMode,const TFileStoreFactoryFunction aFactory[])
 //
 // Open a file store of any of the types supported by aFactory.
@@ -108,6 +138,26 @@
 	return FromL(file,aFactory);
 	}
 
+/** Opens a file containing a store and constructs an appropriate file store object.
+
+The resulting file store object is of concrete type, i.e. either CDirectFileStore 
+or CPermanentFileStore. The specific type is determined from the layout information 
+held in the file store. Note that if the store object is CPermanentFileStore and the file is writable,
+it is strongly recommended to set EFileWriteDirectIO bit in aFileMode. This is because that
+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, for example, when the power  is lost in
+the middle of database transaction. Therefore, the file write caching should be switched off to maintain integrity.
+
+
+@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.
+@param TFileStoreFactoryFunction An array of file store factory function.
+@return A pointer to the new file store object. 
+@see TFileMode
+@see TFileStoreFactoryFunction
+*/
 EXPORT_C CFileStore* CFileStore::OpenLC(RFs& aFs,const TDesC& aName,TUint aFileMode,const TFileStoreFactoryFunction aFactory[])
 //
 // Open and leave on cleanup stack.
@@ -210,6 +260,26 @@
 	iBuf.Close();
 	}
 
+/** Opens a file containing a store and constructs an appropriate file store object.
+
+The resulting file store object is of concrete type, i.e. either CDirectFileStore 
+or CPermanentFileStore. The specific type is determined from the layout information 
+held in the file store. Note that if the store object is CPermanentFileStore and the file is writable,
+it is strongly recommended to set EFileWriteDirectIO bit in aFileMode. This is because that
+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, for example, when the power  is lost in
+the middle of database transaction. Therefore, the file write caching should be switched off to maintain integrity.
+
+
+@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.
+@param TFileStoreFactoryFunction A file store factory function.
+@return A pointer to the new file store object. 
+@see TFileMode
+@see TFileStoreFactoryFunction
+*/
 EXPORT_C CFileStore* CFileStore::OpenL(RFs& aFs,const TDesC& aName,TUint aFileMode,TFileStoreFactoryFunction aFunction)
 //
 // Open a file store using aFunction.
@@ -220,6 +290,26 @@
 	return FromL(file,aFunction);
 	}
 
+/** Opens a file containing a store and constructs an appropriate file store object.
+
+The resulting file store object is of concrete type, i.e. either CDirectFileStore 
+or CPermanentFileStore. The specific type is determined from the layout information 
+held in the file store. Note that if the store object is CPermanentFileStore and the file is writable,
+it is strongly recommended to set EFileWriteDirectIO bit in aFileMode. This is because that
+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, for example, when the power  is lost in
+the middle of database transaction. Therefore, the file write caching should be switched off to maintain integrity.
+
+
+@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.
+@param TFileStoreFactoryFunction A file store factory function.
+@return A pointer to the new file store object. 
+@see TFileMode
+@see TFileStoreFactoryFunction
+*/
 EXPORT_C CFileStore* CFileStore::OpenLC(RFs& aFs,const TDesC& aName,TUint aFileMode,TFileStoreFactoryFunction aFunction)
 //
 // Open and leave on cleanup stack.