persistentstorage/sql/OsLayer/os_symbian.cpp
branchRCL_3
changeset 10 31a8f755b7fe
parent 8 fa9941cf3867
child 12 6b6fd149daa2
--- a/persistentstorage/sql/OsLayer/os_symbian.cpp	Mon Mar 15 12:46:30 2010 +0200
+++ b/persistentstorage/sql/OsLayer/os_symbian.cpp	Thu Apr 01 00:19:42 2010 +0300
@@ -1320,12 +1320,25 @@
 	}
 
 /**
-Replaces all invalid characters in aFileName.
+Removes all invalid characters in aFileName.
 If the file name contains handles (so that's a private secure database related name), the additional
 information (handles, flags, object addresses) has to be excluded from the name in order to make it usable 
-by the file system.
+by the file system. 
+
+The private file name format is (see FhExtractAndStore() comments):
+
+"|<R/O flag><RMessage2 pointer><drive><app SID><file_name><file_ext>|"
 
-@param aFileName Output parameter. The cleaned file name will be copied there.
+Before opening or creating a file, SQLite will call TVfs::FullPathName() passing to the function the name of
+the file and expecting the full file name (including path) as an output from the function.
+After the TVfs::FullPathName() call, the full file name, returned to SQLite, will have the following format:
+
+"|<drive><path><file_name><file_ext>|"
+
+FhConvertToFileName() is called from TVfs::Open() and will remove the leading and trialing '|' characters from
+the file name.
+
+@param aFileName Input/Output parameter. The cleaned file name will be copied there.
 @param aPrivateDir The SQL server private data cage.
 
 @see TVfs::Open()
@@ -1352,7 +1365,7 @@
 	}
 
 /**
-Extracts the read-only flag and RMessage address from aDbFileName and stores them in single COsLayerData instance.
+Extracts the read-only flag and RMessage address from aDbFileName and stores them in the single COsLayerData instance.
 
 @param aDbFileName Input/output parameter. The file name. 
 				   It will be reformatted and won't contain the already extracted data.
@@ -2235,7 +2248,7 @@
 	else
 		{
 		if(fhStrType == EFhStr)
-			{//Not the main db file. Replace invalid characters in the file name
+			{//Not the main db file. Remove invalid characters in the file name
 			::FhConvertToFileName(fname, osLayerData.iSysPrivDir);//If fname does not have a path, iSysPrivDir will be used
 			}
 		TInt fmode = EFileRead;