libraries/iosrv/client/file_utils.cpp
changeset 50 e81b4e28b3e2
parent 0 7f656887cf89
equal deleted inserted replaced
49:4a2ffd3562a3 50:e81b4e28b3e2
   509 EXPORT_C void TFileName2::FindFileL(RFs& aFs)
   509 EXPORT_C void TFileName2::FindFileL(RFs& aFs)
   510 	{
   510 	{
   511 	User::LeaveIfError(FindFile(aFs));
   511 	User::LeaveIfError(FindFile(aFs));
   512 	}
   512 	}
   513 
   513 
       
   514 EXPORT_C void TFileName2::Normalize(RFs& aFs)
       
   515 	{
       
   516 	// Change this so that the case of each component matches what the file system reckons. ie C:\SYS\Bin would be changed to c:\sys\bin
       
   517 	ASSERT(IsAbsolute());
       
   518 	TInt err = KErrNone;
       
   519 	TEntry entry;
       
   520 	TParse parse;
       
   521 	parse.Set(*this, NULL, NULL);
       
   522 
       
   523 	while (!err)
       
   524 		{
       
   525 		err = aFs.Entry(parse.FullName(), entry);
       
   526 		if (!err) err = parse.PopDir();
       
   527 		if (!err)
       
   528 			{
       
   529 			Replace(parse.FullName().Length(), entry.iName.Length(), entry.iName);
       
   530 			}
       
   531 		}
       
   532 	}