24 #include "sl_cache.h" |
24 #include "sl_cache.h" |
25 #include "sl_leafdir_cache.h" |
25 #include "sl_leafdir_cache.h" |
26 #include "sl_dir_cache.h" |
26 #include "sl_dir_cache.h" |
27 #include "sl_scandrv.h" |
27 #include "sl_scandrv.h" |
28 #include <hal.h> |
28 #include <hal.h> |
|
29 #include <f32dbg.h> |
29 |
30 |
30 TShortName DoGenerateShortNameL(const TDesC& aLongName,TInt& aNum,TBool aUseTildeSelectively); |
31 TShortName DoGenerateShortNameL(const TDesC& aLongName,TInt& aNum,TBool aUseTildeSelectively); |
31 |
32 |
32 |
33 |
33 //----------------------------------------------------------------------------------------- |
34 //----------------------------------------------------------------------------------------- |
1339 TEntryPos firstEntryPos(RootIndicator(),0); |
1340 TEntryPos firstEntryPos(RootIndicator(),0); |
1340 TFatDirEntry firstEntry; |
1341 TFatDirEntry firstEntry; |
1341 FindEntryStartL(RemoveTrailingDots(aName),KEntryAttMaskSupported,firstEntry,firstEntryPos); |
1342 FindEntryStartL(RemoveTrailingDots(aName),KEntryAttMaskSupported,firstEntry,firstEntryPos); |
1342 MoveToDosEntryL(firstEntryPos,firstEntry); |
1343 MoveToDosEntryL(firstEntryPos,firstEntry); |
1343 TUint setAttMask=aSetAttMask&KEntryAttMaskSupported; |
1344 TUint setAttMask=aSetAttMask&KEntryAttMaskSupported; |
|
1345 TInt oldAtt = firstEntry.Attributes(); |
|
1346 TInt att = oldAtt; |
1344 if (setAttMask|aClearAttMask) |
1347 if (setAttMask|aClearAttMask) |
1345 { |
1348 { |
1346 TInt att=firstEntry.Attributes(); |
|
1347 att|=setAttMask; |
1349 att|=setAttMask; |
1348 att&=(~aClearAttMask); |
1350 att&=(~aClearAttMask); |
1349 firstEntry.SetAttributes(att); |
1351 firstEntry.SetAttributes(att); |
1350 } |
1352 } |
1351 if (aSetAttMask&KEntryAttModified) |
1353 if (aSetAttMask&KEntryAttModified) |
1352 { |
1354 { |
1353 firstEntry.SetTime(aTime,TimeOffset()); |
1355 firstEntry.SetTime(aTime,TimeOffset()); |
1354 } |
1356 } |
|
1357 else if (att == oldAtt) |
|
1358 return; // no change - don't bother writing entry |
1355 WriteDirEntryL(firstEntryPos,firstEntry); |
1359 WriteDirEntryL(firstEntryPos,firstEntry); |
1356 } |
1360 } |
1357 |
1361 |
1358 //----------------------------------------------------------------------------------------- |
1362 //----------------------------------------------------------------------------------------- |
1359 |
1363 |
3621 break; |
3625 break; |
3622 } |
3626 } |
3623 case EDisableFATDirCache: |
3627 case EDisableFATDirCache: |
3624 { |
3628 { |
3625 MWTCacheInterface* pDirCache = iRawDisk->DirCacheInterface(); |
3629 MWTCacheInterface* pDirCache = iRawDisk->DirCacheInterface(); |
3626 TUint32 KEDisableFATDirCache = CDynamicDirCache::EDisableCache; |
3630 TUint32 KEDisableFATDirCache = MWTCacheInterface::EDisableCache; |
3627 pDirCache->Control(KEDisableFATDirCache, (TUint32) aParam1, NULL); |
3631 pDirCache->Control(KEDisableFATDirCache, (TUint32) aParam1, NULL); |
3628 break; |
3632 break; |
3629 } |
3633 } |
3630 case EDumpFATDirCache: |
3634 case EDumpFATDirCache: |
3631 { |
3635 { |
3632 MWTCacheInterface* pDirCache = iRawDisk->DirCacheInterface(); |
3636 MWTCacheInterface* pDirCache = iRawDisk->DirCacheInterface(); |
3633 TUint32 KEDumpFATDirCache = CDynamicDirCache::EDumpCache; |
3637 if (pDirCache) |
3634 pDirCache->Control(KEDumpFATDirCache, 0, NULL); |
3638 { |
|
3639 TUint32 KEDumpFATDirCache = MWTCacheInterface::EDumpCache; |
|
3640 pDirCache->Control(KEDumpFATDirCache, 0, NULL); |
|
3641 } |
3635 break; |
3642 break; |
3636 } |
3643 } |
3637 case EFATDirCacheInfo: |
3644 case EFATDirCacheInfo: |
3638 { |
3645 { |
3639 MWTCacheInterface* pDirCache = iRawDisk->DirCacheInterface(); |
3646 MWTCacheInterface* pDCache = iRawDisk->DirCacheInterface(); |
3640 TUint32 KEFATDirCacheInfo = CDynamicDirCache::ECacheInfo; |
3647 if (pDCache) |
3641 pDirCache->Control(KEFATDirCacheInfo, 0, NULL); |
3648 { |
3642 break; |
3649 TUint32 KEFATDirCacheInfo = MWTCacheInterface::ECacheInfo; |
|
3650 TDirCacheInfo aInfo; |
|
3651 TInt r = pDCache->Control(KEFATDirCacheInfo, 0, static_cast<TAny*>(&aInfo)); |
|
3652 if (r == KErrNone) |
|
3653 { |
|
3654 TPckgBuf<TDirCacheInfo> pkgBuf(aInfo); |
|
3655 r = aMessage.Write(2,pkgBuf); |
|
3656 } |
|
3657 return r; |
|
3658 } |
|
3659 return KErrNotSupported; |
3643 } |
3660 } |
3644 |
3661 |
3645 |
3662 |
3646 default: return(KErrNotSupported); |
3663 default: return(KErrNotSupported); |
3647 } |
3664 } |