userlibandfileserver/fileserver/sfile/sf_file_cache.cpp
changeset 266 0008ccd16016
parent 201 43365a9b78a3
equal deleted inserted replaced
259:57b9594f5772 266:0008ccd16016
  2190 
  2190 
  2191 	return TFileCacheFlags(flags);
  2191 	return TFileCacheFlags(flags);
  2192 	}
  2192 	}
  2193 
  2193 
  2194 
  2194 
  2195 	
       
  2196 _LIT8(KLitSectionNameDrive,"Drive%C");
       
  2197 
       
  2198 static const TPtrC8 KCacheFlagEnumStrings[]=
  2195 static const TPtrC8 KCacheFlagEnumStrings[]=
  2199 	{
  2196 	{
  2200 	_S8("OFF"),
  2197 	_S8("OFF"),
  2201 	_S8("ENABLED"),
  2198 	_S8("ENABLED"),
  2202 	_S8("ON"),
  2199 	_S8("ON"),
  2239 
  2236 
  2240 
  2237 
  2241 	// Get file cache configuration settings for this drive
  2238 	// Get file cache configuration settings for this drive
  2242 	// N.B. Size/length values are specified in Kilobytes, timer values in Milliseconds
  2239 	// N.B. Size/length values are specified in Kilobytes, timer values in Milliseconds
  2243 	TBuf8<8> sectionName;
  2240 	TBuf8<8> sectionName;
  2244 	sectionName.Format(KLitSectionNameDrive, 'A' + aDriveNumber);
  2241 	F32Properties::GetDriveSection(aDriveNumber, sectionName);
  2245 
  2242 
  2246 	TInt32 val;
  2243 	TInt32 val;
  2247 	//  Read FileCacheSize
  2244 	//  Read FileCacheSize
  2248 	if (F32Properties::GetInt(sectionName, _L8("FileCacheSize"),		val))
  2245 	if (F32Properties::GetInt(sectionName, _L8("FileCacheSize"),		val))
  2249 		driveCacheSettings->iCacheSize = val << KByteToByteShift;
  2246 		driveCacheSettings->iCacheSize = val << KByteToByteShift;