sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Common test code for Mass Storage sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "t_ms_main.h" sl@0: sl@0: GLDEF_C TBool isDriveRemovable(TInt aDriveNumber) sl@0: { sl@0: RFs fs; sl@0: test(KErrNone == fs.Connect()); sl@0: TDriveInfo info; sl@0: fs.Drive(info, aDriveNumber); sl@0: fs.Close(); sl@0: if (info.iDriveAtt & KDriveAttRemovable) sl@0: { sl@0: return ETrue; sl@0: } sl@0: return EFalse; sl@0: }