userlibandfileserver/fileserver/sfat32/sl_fsy.cpp
changeset 10 36bfc973b146
parent 9 96e5fb8b040d
equal deleted inserted replaced
9:96e5fb8b040d 10:36bfc973b146
   107 	aPath[0] = (TUint8) RFs::GetSystemDriveChar();
   107 	aPath[0] = (TUint8) RFs::GetSystemDriveChar();
   108 	return(KErrNone);
   108 	return(KErrNone);
   109 	}
   109 	}
   110 
   110 
   111 
   111 
   112 void CFatFileSystem::DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const
       
   113 //
       
   114 // Return the drive info. iBatteryState are already set.
       
   115 //
       
   116 	{
       
   117 
       
   118 	if(!IsValidLocalDriveMapping(aDriveNumber))
       
   119 		return;
       
   120 
       
   121     TLocalDriveCapsV2Buf localDriveCaps;
       
   122 	
       
   123 	TInt r = KErrNone;
       
   124 
       
   125 	// is the drive local?
       
   126 	if (!IsProxyDrive(aDriveNumber))
       
   127 		{
       
   128 		// if not valid local drive, use default values in localDriveCaps
       
   129 		// if valid local drive and not locked, use TBusLocalDrive::Caps() values
       
   130 		// if valid drive and locked, hard-code attributes
       
   131 		r = GetLocalDrive(aDriveNumber).Caps(localDriveCaps);
       
   132 		}
       
   133 	else  // this need to be made a bit nicer
       
   134 		{   
       
   135 		CExtProxyDrive* pD = GetProxyDrive(aDriveNumber);
       
   136 		if(pD)
       
   137 			r = pD->Caps(localDriveCaps);
       
   138 		else
       
   139 			r = KErrNotReady;	// What should the behaviour really be here?
       
   140 		}
       
   141 
       
   142 	if (r != KErrLocked )
       
   143 		{
       
   144 		anInfo.iMediaAtt=localDriveCaps().iMediaAtt;
       
   145 		}
       
   146 	else
       
   147 		{
       
   148 		anInfo.iMediaAtt = KMediaAttLocked | KMediaAttLockable | KMediaAttHasPassword;
       
   149 		}
       
   150 
       
   151 	anInfo.iType=localDriveCaps().iType;
       
   152 	anInfo.iDriveAtt=localDriveCaps().iDriveAtt;
       
   153 	}
       
   154 
       
   155 
       
   156 TBool CFatFileSystem::IsExtensionSupported() const
   112 TBool CFatFileSystem::IsExtensionSupported() const
   157 //
   113 //
   158 //
   114 //
   159 //
   115 //
   160 	{
   116 	{