kerneltest/f32test/fileutils/src/f32_test_utils.cpp
changeset 200 73ea206103e6
parent 0 a41df078684a
child 244 a77889bee936
--- a/kerneltest/f32test/fileutils/src/f32_test_utils.cpp	Fri Jun 11 15:02:23 2010 +0300
+++ b/kerneltest/f32test/fileutils/src/f32_test_utils.cpp	Wed Jun 23 19:44:53 2010 +0300
@@ -248,6 +248,7 @@
 _LIT(KFsName_Win32, "Win32");
 _LIT(KFsName_ExFAT, "ExFat");
 _LIT(KFsName_AutoMonuter, "automounter");
+_LIT(KFsName_HVFS, "HVFS");
 
 /**  @return ETrue if "Automounter" FS is mounted on this drive */
 TBool F32_Test_Utils::Is_Automounter(RFs &aFs, TInt aDrive)
@@ -273,7 +274,7 @@
 
 }
    
-/** @return ETrue if "Win32" FS is mounted on this drive (i.e this is emulator's drive c:) */
+/** @return ETrue if "Win32" FS is mounted on this drive (i.e this is emulator's drive C:) */
 TBool F32_Test_Utils::Is_Win32(RFs &aFs, TInt aDrive)   
 {
 	ASSERT(aDrive >= EDriveA && aDrive <= EDriveZ);
@@ -284,6 +285,29 @@
     return (f.CompareF(KFsName_Win32) == 0 );
 }
 
+/** @return ETrue if "HVFS" is mounted on this drive (i.e PlatSim's drive C:) */
+TBool F32_Test_Utils::Is_HVFS(RFs &aFs, TInt aDrive)
+{
+	ASSERT(aDrive >= EDriveA && aDrive <= EDriveZ);
+    TFSName f;
+	TInt r = aFs.FileSystemName(f, aDrive);
+    __ASSERT_ALWAYS((r==KErrNone) && (f.Length()>0), User::Invariant());
+
+    return (f.CompareF(KFsName_HVFS) == 0);
+}
+
+/** @return ETrue if "HVFS" or "Win32" FS is mounted on this drive
+ * 			(i.e drive C: of PlatSim or the emulator) */
+TBool F32_Test_Utils::Is_SimulatedSystemDrive(RFs &aFs, TInt aDrive)
+{
+	ASSERT(aDrive >= EDriveA && aDrive <= EDriveZ);
+    TFSName f;
+	TInt r = aFs.FileSystemName(f, aDrive);
+    __ASSERT_ALWAYS((r==KErrNone) && (f.Length()>0), User::Invariant());
+
+    return (f.CompareF(KFsName_HVFS) == 0 || f.CompareF(KFsName_Win32) == 0);
+}
+
 /** @return ETrue if the filesystem if FAT (fat12/16/32) */
 TBool F32_Test_Utils::Is_Fat(RFs &aFs, TInt aDrive)
 {