sl@0: /* sl@0: * Copyright (c) 2005-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 "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: * sl@0: */ sl@0: sl@0: sl@0: #include "T_TestFSY.h" sl@0: sl@0: /*@{*/ sl@0: _LIT(KDefaultPath, "C:\\"); sl@0: /*@}*/ sl@0: sl@0: CTestFileSystem::CTestFileSystem() sl@0: // sl@0: // Constructor sl@0: // sl@0: { sl@0: } sl@0: sl@0: CMountCB* CTestFileSystem::NewMountL() const sl@0: // sl@0: // Create a new mount control block sl@0: // sl@0: { sl@0: return (new(ELeave) CTestMountCB); sl@0: } sl@0: sl@0: CFileCB* CTestFileSystem::NewFileL() const sl@0: // sl@0: // Create a new file sl@0: // sl@0: { sl@0: return (new(ELeave) CTestFileCB); sl@0: } sl@0: sl@0: CDirCB* CTestFileSystem::NewDirL() const sl@0: // sl@0: // create a new directory lister sl@0: // sl@0: { sl@0: return (new(ELeave) CTestDirCB); sl@0: } sl@0: sl@0: CFormatCB* CTestFileSystem::NewFormatL() const sl@0: // sl@0: // Create a new media formatter sl@0: // sl@0: { sl@0: return (new(ELeave) CTestFormatCB); sl@0: } sl@0: sl@0: TInt CTestFileSystem::DefaultPath(TDes& aPath) const sl@0: // sl@0: // Return the intial default path sl@0: // sl@0: { sl@0: aPath=KDefaultPath; sl@0: return KErrNone; sl@0: } sl@0: sl@0: void CTestFileSystem::DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const sl@0: // sl@0: // Return drive info - iDriveAtt and iBatteryState are already set sl@0: // sl@0: { sl@0: TLocalDriveCapsV2Buf localDriveCaps; sl@0: DriveNumberToLocalDrive(aDriveNumber).Caps(localDriveCaps); sl@0: anInfo.iMediaAtt=localDriveCaps().iMediaAtt; sl@0: anInfo.iType=localDriveCaps().iType; sl@0: anInfo.iDriveAtt=localDriveCaps().iDriveAtt; sl@0: } sl@0: sl@0: TBusLocalDrive& CTestFileSystem::DriveNumberToLocalDrive(TInt aDriveNumber) const sl@0: // sl@0: // Return the local drive associated with aDriveNumber sl@0: // sl@0: { sl@0: return(GetLocalDrive(aDriveNumber)); sl@0: }