|
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Util methods for File Manager |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <AknUtils.h> |
|
22 #include <StringLoader.h> |
|
23 #include <CDirectoryLocalizer.h> |
|
24 #include <CommonContentPolicy.h> |
|
25 #include <bautils.h> |
|
26 #include <caf/caf.h> |
|
27 #include <DcfCommon.h> |
|
28 #include <FileManagerEngine.rsg> |
|
29 #ifdef RD_MULTIPLE_DRIVE |
|
30 #include <driveinfo.h> |
|
31 #endif // RD_MULTIPLE_DRIVE |
|
32 #if defined( __KEEP_DRM_CONTENT_ON_PHONE ) && defined ( FILE_MANAGER_USE_DISTRIBUTABLECHECKER ) |
|
33 #include <distributablechecker.h> |
|
34 #endif // __KEEP_DRM_CONTENT_ON_PHONE && FILE_MANAGER_USE_DISTRIBUTABLECHECKER |
|
35 #include "GflmUtils.h" |
|
36 #include <drmutility.h> |
|
37 #include "CFileManagerUtils.h" |
|
38 #include "CFilemanagerMimeIconArray.h" |
|
39 #include "Cfilemanagerfolderarray.h" |
|
40 #include "CGflmNavigatorModel.h" |
|
41 #include "CFileManagerItemProperties.h" |
|
42 #include "CFileManagerCommonDefinitions.h" |
|
43 #include "CGflmGroupItem.h" |
|
44 #include "CGflmFileSystemItem.h" |
|
45 #include "CGflmDriveItem.h" |
|
46 #include "CFileManagerFeatureManager.h" |
|
47 |
|
48 // CONSTANTS |
|
49 _LIT( KFlk, "flk:" ); |
|
50 _LIT( KLdf, "ldf:" ); |
|
51 |
|
52 #ifdef RD_MULTIPLE_DRIVE |
|
53 const TInt KDriveNameArrayLen = 2; |
|
54 const TInt KDriveLetterIndex = 0; |
|
55 const TInt KDriveNameIndex = 1; |
|
56 enum TFmgrDriveNameType |
|
57 { |
|
58 EFmgrDeviceMemory = 0, |
|
59 EFmgrMassStorage, |
|
60 EFmgrNamedMemoryCard, |
|
61 EFmgrDefaultMemoryCard, |
|
62 EFmgrDefaultUsbMemory, |
|
63 EFmgrDriveNameTypeCount // Must be the last |
|
64 }; |
|
65 |
|
66 typedef TInt TFmgrDriveNameLayoutText[ EFmgrDriveNameTypeCount ]; |
|
67 const TFmgrDriveNameLayoutText KFmgrDriveNames[] = |
|
68 { |
|
69 { // CFileManagerUtils::EMainLayout |
|
70 R_QTN_FMGR_MAIN_DEVICE_MEMORY, // EFmgrDeviceMemory |
|
71 R_QTN_FMGR_MAIN_MASS_STORAGE, // EFmgrMassStorage |
|
72 R_QTN_FMGR_MAIN_NAMED_MEMORY_CARD, // EFmgrNamedMemoryCard |
|
73 R_QTN_FMGR_MAIN_MEMORY_CARD_DEFAULT, // EFmgrDefaultMemoryCard |
|
74 R_QTN_FMGR_MAIN_USB_DEFAULT // EFmgrDefaultUsbMemory |
|
75 }, |
|
76 { // CFileManagerUtils::ETitleLayout |
|
77 R_QTN_FMGR_TITLE_DEVICE_MEMORY, // EFmgrDeviceMemory |
|
78 R_QTN_FMGR_TITLE_MASS_STORAGE, // EFmgrMassStorage |
|
79 R_QTN_FMGR_TITLE_NAMED_MEMORY_CARD, // EFmgrNamedMemoryCard |
|
80 R_QTN_FMGR_TITLE_MEMORY_CARD_DEFAULT, // EFmgrDefaultMemoryCard |
|
81 R_QTN_FMGR_TITLE_USB_DEFAULT, // EFmgrDefaultUsbMemory |
|
82 } |
|
83 }; |
|
84 #endif // RD_MULTIPLE_DRIVE |
|
85 |
|
86 |
|
87 // ============================ MEMBER FUNCTIONS =============================== |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CFileManagerUtils::CFileManagerUtils |
|
91 // C++ default constructor can NOT contain any code, that |
|
92 // might leave. |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 CFileManagerUtils::CFileManagerUtils( |
|
96 RFs& aFs, |
|
97 CGflmNavigatorModel& aNavigator, |
|
98 CFileManagerFeatureManager& aFeatureManager ) : |
|
99 iFs( aFs ), |
|
100 iNavigator( aNavigator ), |
|
101 iFeatureManager( aFeatureManager ) |
|
102 { |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // CFileManagerUtils::ConstructL |
|
107 // Symbian 2nd phase constructor can leave. |
|
108 // ----------------------------------------------------------------------------- |
|
109 // |
|
110 void CFileManagerUtils::ConstructL() |
|
111 { |
|
112 // Check and set value to indicate if the feature is supported |
|
113 iDrmFullSupported = iFeatureManager.IsDrmFullSupported(); |
|
114 |
|
115 iMimeIconMapper = CFileManagerMimeIconArray::NewL( |
|
116 R_FILEMANAGER_MIME_ICON_MAPPER, iNavigator ); |
|
117 |
|
118 #ifdef RD_MULTIPLE_DRIVE |
|
119 iDefaultFolders = CFileManagerFolderArray::NewL( *this ); |
|
120 #else // RD_MULTIPLE_DRIVE |
|
121 iDefaultFolders = CFileManagerFolderArray::NewL( |
|
122 R_FILEMANAGER_DEFAULT_FOLDERS, *this ); |
|
123 iDefaultFolders->CreateFolders(); |
|
124 #endif // RD_MULTIPLE_DRIVE |
|
125 |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // CFileManagerUtils::NewL |
|
130 // Two-phased constructor. |
|
131 // ----------------------------------------------------------------------------- |
|
132 // |
|
133 CFileManagerUtils* CFileManagerUtils::NewL( |
|
134 RFs& aFs, |
|
135 CGflmNavigatorModel& aNavigator, |
|
136 CFileManagerFeatureManager& aFeatureManager ) |
|
137 { |
|
138 CFileManagerUtils* self = |
|
139 new( ELeave ) CFileManagerUtils( aFs, aNavigator, aFeatureManager ); |
|
140 |
|
141 CleanupStack::PushL( self ); |
|
142 self->ConstructL(); |
|
143 CleanupStack::Pop( self ); |
|
144 |
|
145 return self; |
|
146 } |
|
147 |
|
148 // ----------------------------------------------------------------------------- |
|
149 // CFileManagerUtils::~CFileManagerUtils |
|
150 // |
|
151 // ----------------------------------------------------------------------------- |
|
152 // |
|
153 CFileManagerUtils::~CFileManagerUtils() |
|
154 { |
|
155 #if defined( __KEEP_DRM_CONTENT_ON_PHONE ) && defined ( FILE_MANAGER_USE_DISTRIBUTABLECHECKER ) |
|
156 delete iDistributableChecker; |
|
157 #endif // __KEEP_DRM_CONTENT_ON_PHONE && FILE_MANAGER_USE_DISTRIBUTABLECHECKER |
|
158 delete iMimeIconMapper; |
|
159 delete iDefaultFolders; |
|
160 delete iCommonContentPolicy; |
|
161 } |
|
162 |
|
163 // ----------------------------------------------------------------------------- |
|
164 // CFileManagerUtils::Fs() const |
|
165 // |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 RFs& CFileManagerUtils::Fs() const |
|
169 { |
|
170 return iFs; |
|
171 } |
|
172 |
|
173 // ----------------------------------------------------------------------------- |
|
174 // CFileManagerUtils::IsForwardLockedFile |
|
175 // ----------------------------------------------------------------------------- |
|
176 // |
|
177 TBool CFileManagerUtils::IsForwardLockedFile( const TDesC& aFullPath ) |
|
178 { |
|
179 if ( iDrmFullSupported ) |
|
180 { |
|
181 return EFalse; // Full DRM is used |
|
182 } |
|
183 TBool ret( EFalse ); |
|
184 |
|
185 if ( !iCommonContentPolicy ) |
|
186 { |
|
187 TRAPD( err, iCommonContentPolicy = CCommonContentPolicy::NewL() ); |
|
188 if ( err != KErrNone ) |
|
189 { |
|
190 _LIT( KReason, "No Common Content Policy" ); |
|
191 User::Panic( KReason, err ); |
|
192 } |
|
193 } |
|
194 |
|
195 if( iCommonContentPolicy ) |
|
196 { |
|
197 TRAPD( err, ret = iCommonContentPolicy->IsClosedFileL( aFullPath ) ); |
|
198 if ( err != KErrNone ) |
|
199 { |
|
200 ret = EFalse; |
|
201 } |
|
202 } |
|
203 |
|
204 return ret; |
|
205 } |
|
206 |
|
207 // ----------------------------------------------------------------------------- |
|
208 // CFileManagerUtils::IsDrmProtectedFile |
|
209 // ----------------------------------------------------------------------------- |
|
210 // |
|
211 TBool CFileManagerUtils::IsDrmProtectedFile( const TDesC& aFullPath ) const |
|
212 { |
|
213 if ( !iDrmFullSupported ) |
|
214 { |
|
215 return EFalse; // Partial DRM is used |
|
216 } |
|
217 #if 0 |
|
218 // Check from file extension, this is the fastest possible check |
|
219 _LIT( KOdfExt, ".odf" ); |
|
220 _LIT( KDcfExt, ".dcf" ); |
|
221 TParsePtrC parse( aFullPath ); |
|
222 TPtrC ext( parse.Ext() ); |
|
223 return ( !ext.CompareF( KOdfExt ) || !ext.CompareF( KDcfExt ) ); |
|
224 #else |
|
225 // Do similar quick check than in old DRMCommon |
|
226 |
|
227 RFile64 drmFile; |
|
228 |
|
229 User::LeaveIfError( drmFile.Open( |
|
230 iFs, aFullPath, EFileRead | EFileShareReadersOrWriters ) ); |
|
231 CleanupClosePushL( drmFile ); |
|
232 DRM::CDrmUtility *drmCheck = DRM::CDrmUtility::NewLC(); |
|
233 |
|
234 TBool isProtected( EFalse ); |
|
235 if ( drmCheck->IsProtectedL(drmFile) ) |
|
236 { |
|
237 isProtected = ETrue; |
|
238 } |
|
239 CleanupStack::PopAndDestroy(drmCheck); |
|
240 CleanupStack::PopAndDestroy( &drmFile ); |
|
241 return isProtected; |
|
242 #endif |
|
243 } |
|
244 |
|
245 // ----------------------------------------------------------------------------- |
|
246 // CFileManagerUtils::ResolveIconL |
|
247 // |
|
248 // ----------------------------------------------------------------------------- |
|
249 // |
|
250 TInt CFileManagerUtils::ResolveIconL( const TDesC& aFullPath ) const |
|
251 { |
|
252 TInt iconId( EFileManagerOtherFileIcon ); |
|
253 if ( HasFinalBackslash( aFullPath ) ) |
|
254 { |
|
255 // Do not check for subfolders for remote drives |
|
256 iconId = EFileManagerFolderIcon; |
|
257 if ( !IsRemoteDrive( aFullPath ) ) |
|
258 { |
|
259 if ( HasSubFolders( aFullPath ) ) |
|
260 { |
|
261 iconId = EFileManagerFolderSubIcon; |
|
262 } |
|
263 else if ( !HasFiles( aFullPath ) ) |
|
264 { |
|
265 iconId = EFileManagerFolderEmptyIcon; |
|
266 } |
|
267 } |
|
268 } |
|
269 else |
|
270 { |
|
271 iconId = iMimeIconMapper->ResolveIconL( aFullPath ); |
|
272 } |
|
273 return iconId; |
|
274 } |
|
275 |
|
276 // ----------------------------------------------------------------------------- |
|
277 // CFileManagerUtils::DefaultFolder |
|
278 // |
|
279 // ----------------------------------------------------------------------------- |
|
280 // |
|
281 TBool CFileManagerUtils::DefaultFolder( const TDesC& aFullPath ) const |
|
282 { |
|
283 return iDefaultFolders->Contains( aFullPath ); |
|
284 } |
|
285 |
|
286 // ----------------------------------------------------------------------------- |
|
287 // CFileManagerUtils::IsDrmLocalDataFile |
|
288 // |
|
289 // ----------------------------------------------------------------------------- |
|
290 // |
|
291 TBool CFileManagerUtils::IsDrmLocalDataFile( const TDesC& aFullPath ) const |
|
292 { |
|
293 if ( !iDrmFullSupported ) |
|
294 { |
|
295 return EFalse; // Partial DRM is used |
|
296 } |
|
297 |
|
298 TBool isFlk( EFalse ); |
|
299 TBool isLdf( EFalse ); |
|
300 TRAP_IGNORE( IsFlkOrLdfFileL( aFullPath, isFlk, isLdf ) ); |
|
301 return isLdf; |
|
302 } |
|
303 |
|
304 // ----------------------------------------------------------------------------- |
|
305 // CFileManagerUtils::CanDelete |
|
306 // |
|
307 // ----------------------------------------------------------------------------- |
|
308 // |
|
309 TBool CFileManagerUtils::CanDelete( const TDesC& aFileName ) const |
|
310 { |
|
311 TEntry entry; |
|
312 TBool ret( EFalse ); |
|
313 TBool fileOpen( EFalse ); |
|
314 if ( KErrNone == iFs.Entry( aFileName, entry ) && |
|
315 KErrNone == iFs.IsFileOpen( aFileName, fileOpen ) ) |
|
316 { |
|
317 if ( !entry.IsReadOnly() && !entry.IsSystem() && !fileOpen ) |
|
318 { |
|
319 ret = ETrue; |
|
320 } |
|
321 } |
|
322 return ret; |
|
323 } |
|
324 |
|
325 // ----------------------------------------------------------------------------- |
|
326 // CFileManagerUtils::FileTypeL |
|
327 // |
|
328 // ----------------------------------------------------------------------------- |
|
329 // |
|
330 TUint32 CFileManagerUtils::FileTypeL( const TDesC& aFullPath ) |
|
331 { |
|
332 TUint32 fileType( CFileManagerItemProperties::ENotDefined ); |
|
333 |
|
334 _LIT( KRootFolder, "?:\\" ); |
|
335 if ( !aFullPath.MatchF( KRootFolder ) ) |
|
336 { |
|
337 // RFs::Entry cannot be used for root folders |
|
338 fileType |= CFileManagerItemProperties::EFolder; |
|
339 } |
|
340 else if ( !IsRemoteDrive( aFullPath ) ) |
|
341 { |
|
342 // Full check for local and removable drives |
|
343 TEntry entry; |
|
344 User::LeaveIfError( iFs.Entry( aFullPath, entry ) ); |
|
345 |
|
346 if ( HasFinalBackslash( aFullPath ) || entry.IsDir() ) |
|
347 { |
|
348 fileType |= CFileManagerItemProperties::EFolder; |
|
349 |
|
350 if ( DefaultFolder( aFullPath ) ) |
|
351 { |
|
352 fileType |= CFileManagerItemProperties::EDefault; |
|
353 } |
|
354 } |
|
355 else |
|
356 { |
|
357 fileType |= CFileManagerItemProperties::EFile; |
|
358 |
|
359 if ( IsDrmProtectedFile( aFullPath) ) |
|
360 { |
|
361 fileType |= CFileManagerItemProperties::EDrmProtected; |
|
362 if ( IsDrmLocalDataFile( aFullPath ) ) |
|
363 { |
|
364 fileType |= CFileManagerItemProperties::EDrmLocalDataFile; |
|
365 } |
|
366 } |
|
367 if ( IsForwardLockedFile( aFullPath ) ) |
|
368 { |
|
369 fileType |= CFileManagerItemProperties::EForwardLocked; |
|
370 } |
|
371 // MimeIcon mapper knowledge is used to determine file type |
|
372 TInt id( iMimeIconMapper->ResolveIconL( aFullPath ) ); |
|
373 if ( id == EFileManagerLinkFileIcon ) |
|
374 { |
|
375 fileType |= CFileManagerItemProperties::ELink; |
|
376 } |
|
377 if ( id == EFileManagerPlaylistFileIcon ) |
|
378 { |
|
379 fileType |= CFileManagerItemProperties::EPlaylist; |
|
380 } |
|
381 |
|
382 TBool fileOpen( EFalse ); |
|
383 if ( iFs.IsFileOpen( aFullPath, fileOpen ) == KErrNone ) |
|
384 { |
|
385 if ( fileOpen ) |
|
386 { |
|
387 fileType |= CFileManagerItemProperties::EOpen; |
|
388 } |
|
389 } |
|
390 if ( fileOpen || entry.IsReadOnly() || entry.IsSystem() ) |
|
391 { |
|
392 fileType |= CFileManagerItemProperties::EReadOnly; |
|
393 } |
|
394 } |
|
395 } |
|
396 else |
|
397 { |
|
398 // Simple check for remote drives |
|
399 if ( HasFinalBackslash( aFullPath ) ) |
|
400 { |
|
401 fileType |= CFileManagerItemProperties::EFolder; |
|
402 } |
|
403 else |
|
404 { |
|
405 fileType |= CFileManagerItemProperties::EFile; |
|
406 if ( IsDrmProtectedFile( aFullPath) ) |
|
407 { |
|
408 fileType |= CFileManagerItemProperties::EDrmProtected; |
|
409 } |
|
410 } |
|
411 } |
|
412 |
|
413 return fileType; |
|
414 } |
|
415 |
|
416 // ----------------------------------------------------------------------------- |
|
417 // CFileManagerUtils::ResolveIconL |
|
418 // |
|
419 // ----------------------------------------------------------------------------- |
|
420 // |
|
421 TInt CFileManagerUtils::ResolveIconL( CGflmGroupItem& aItem ) const |
|
422 { |
|
423 TInt iconId( EFileManagerOtherFileIcon ); |
|
424 if ( aItem.GetIconId( iconId ) == KErrNone ) |
|
425 { |
|
426 // Use already mapped icon |
|
427 return iconId; |
|
428 } |
|
429 |
|
430 // Map icon |
|
431 switch ( aItem.Type() ) |
|
432 { |
|
433 case CGflmGroupItem::EFile: |
|
434 { |
|
435 CGflmFileSystemItem& fsItem = |
|
436 static_cast< CGflmFileSystemItem& >( aItem ); |
|
437 HBufC* fullPath = fsItem.FullPathLC(); |
|
438 iconId = iMimeIconMapper->ResolveIconL( *fullPath ); |
|
439 fsItem.SetIconId( iconId ); |
|
440 CleanupStack::PopAndDestroy( fullPath ); |
|
441 break; |
|
442 } |
|
443 case CGflmGroupItem::EDirectory: |
|
444 { |
|
445 CGflmFileSystemItem& fsItem = |
|
446 static_cast< CGflmFileSystemItem& >( aItem ); |
|
447 HBufC* fullPath = fsItem.FullPathLC(); |
|
448 |
|
449 // Do not check for subfolders for remote drives |
|
450 iconId = EFileManagerFolderIcon; |
|
451 if ( !IsRemoteDrive( *fullPath ) ) |
|
452 { |
|
453 if ( HasSubFolders( *fullPath ) ) |
|
454 { |
|
455 iconId = EFileManagerFolderSubIcon; |
|
456 } |
|
457 else if ( !HasFiles( *fullPath ) ) |
|
458 { |
|
459 iconId = EFileManagerFolderEmptyIcon; |
|
460 } |
|
461 } |
|
462 fsItem.SetIconId( iconId ); |
|
463 CleanupStack::PopAndDestroy( fullPath ); |
|
464 break; |
|
465 } |
|
466 case CGflmGroupItem::EDrive: // Fall through |
|
467 case CGflmGroupItem::EGlobalActionItem: |
|
468 { |
|
469 break; |
|
470 } |
|
471 default: |
|
472 { |
|
473 User::Leave( KErrNotFound ); |
|
474 break; |
|
475 } |
|
476 } |
|
477 |
|
478 return iconId; |
|
479 } |
|
480 |
|
481 // ----------------------------------------------------------------------------- |
|
482 // CFileManagerUtils::HasAny |
|
483 // |
|
484 // ----------------------------------------------------------------------------- |
|
485 // |
|
486 TBool CFileManagerUtils::HasAny( |
|
487 RFs& aFs, const TDesC& aFullPath, TUint aAttMask ) |
|
488 { |
|
489 RDir dir; |
|
490 TBool ret( EFalse ); |
|
491 if ( dir.Open( aFs, aFullPath, aAttMask ) != KErrNone ) |
|
492 { |
|
493 return EFalse; |
|
494 } |
|
495 TEntry entry; |
|
496 if ( dir.Read( entry ) == KErrNone ) |
|
497 { |
|
498 ret = ETrue; |
|
499 } |
|
500 dir.Close(); |
|
501 return ret; |
|
502 } |
|
503 |
|
504 // ----------------------------------------------------------------------------- |
|
505 // CFileManagerUtils::HasSubFolders |
|
506 // |
|
507 // ----------------------------------------------------------------------------- |
|
508 // |
|
509 TBool CFileManagerUtils::HasSubFolders( const TDesC& aFullPath ) const |
|
510 { |
|
511 return HasAny( iFs, aFullPath, KEntryAttDir | KEntryAttMatchExclusive ); |
|
512 } |
|
513 |
|
514 // ----------------------------------------------------------------------------- |
|
515 // CFileManagerUtils::HasFiles |
|
516 // |
|
517 // ----------------------------------------------------------------------------- |
|
518 // |
|
519 TBool CFileManagerUtils::HasFiles( const TDesC& aFullPath ) const |
|
520 { |
|
521 return HasAny( iFs, aFullPath, KEntryAttNormal ); |
|
522 } |
|
523 |
|
524 // ----------------------------------------------------------------------------- |
|
525 // CFileManagerUtils::IsRemoteDrive |
|
526 // |
|
527 // ----------------------------------------------------------------------------- |
|
528 // |
|
529 TBool CFileManagerUtils::IsRemoteDrive( const TDesC& aPath ) const |
|
530 { |
|
531 TBool ret( EFalse ); |
|
532 |
|
533 if ( aPath.Length() ) |
|
534 { |
|
535 CGflmDriveItem* drvItem = iNavigator.DriveFromPath( aPath ); |
|
536 if ( drvItem ) |
|
537 { |
|
538 const TVolumeInfo& vol( drvItem->VolumeInfo() ); |
|
539 if ( vol.iDrive.iDriveAtt & KDriveAttRemote ) |
|
540 { |
|
541 ret = ETrue; |
|
542 } |
|
543 } |
|
544 } |
|
545 return ret; |
|
546 } |
|
547 |
|
548 // ----------------------------------------------------------------------------- |
|
549 // CFileManagerUtils::CreateDefaultFolders |
|
550 // |
|
551 // ----------------------------------------------------------------------------- |
|
552 // |
|
553 void CFileManagerUtils::CreateDefaultFolders( |
|
554 const TInt aDrive, const TBool aForced ) const |
|
555 { |
|
556 iDefaultFolders->CreateFolders( aDrive, aForced ); |
|
557 } |
|
558 |
|
559 // ----------------------------------------------------------------------------- |
|
560 // CFileManagerUtils::IsDistributableFile |
|
561 // |
|
562 // ----------------------------------------------------------------------------- |
|
563 // |
|
564 TInt CFileManagerUtils::IsDistributableFile( |
|
565 const TDesC& aFullPath, TBool& aIsProtected ) |
|
566 { |
|
567 #if defined( __KEEP_DRM_CONTENT_ON_PHONE ) && defined ( FILE_MANAGER_USE_DISTRIBUTABLECHECKER ) |
|
568 if ( !iDistributableChecker ) |
|
569 { |
|
570 TRAPD( err, iDistributableChecker = CDistributableChecker::NewL() ); |
|
571 if ( err != KErrNone ) |
|
572 { |
|
573 _LIT( KReason, "No Distributablechecker" ); |
|
574 User::Panic( KReason, err ); |
|
575 } |
|
576 } |
|
577 return iDistributableChecker->Check( aFullPath, aIsProtected ); |
|
578 #else // __KEEP_DRM_CONTENT_ON_PHONE && FILE_MANAGER_USE_DISTRIBUTABLECHECKER |
|
579 aIsProtected = EFalse; |
|
580 TBool isFlk( EFalse ); |
|
581 TBool isLdf( EFalse ); |
|
582 TRAPD( err, IsFlkOrLdfFileL( aFullPath, isFlk, isLdf ) ); |
|
583 // Do similar check than in old DRMCommon |
|
584 aIsProtected = ( isFlk || isLdf ); |
|
585 return err; |
|
586 #endif // __KEEP_DRM_CONTENT_ON_PHONE && FILE_MANAGER_USE_DISTRIBUTABLECHECKER |
|
587 } |
|
588 |
|
589 // ----------------------------------------------------------------------------- |
|
590 // CFileManagerUtils::MimeTypeL |
|
591 // |
|
592 // ----------------------------------------------------------------------------- |
|
593 // |
|
594 TPtrC CFileManagerUtils::MimeTypeL( const TDesC& aFullPath ) const |
|
595 { |
|
596 return iNavigator.ResolveMimeTypeL( aFullPath ); |
|
597 } |
|
598 |
|
599 // ----------------------------------------------------------------------------- |
|
600 // CFileManagerUtils::DriveList |
|
601 // |
|
602 // ----------------------------------------------------------------------------- |
|
603 // |
|
604 void CFileManagerUtils::DriveList( |
|
605 RArray< TInt >& aDrives, const TInt aAttMask ) const |
|
606 { |
|
607 aDrives.Reset(); |
|
608 TDriveList drivesList; |
|
609 if ( iFs.DriveList( drivesList ) != KErrNone ) |
|
610 { |
|
611 return; |
|
612 } |
|
613 for ( TInt i( 0 ); i < KMaxDrives; i++ ) |
|
614 { |
|
615 if ( drivesList[ i ] ) |
|
616 { |
|
617 TBool append( EFalse ); |
|
618 TDriveInfo drvInfo; |
|
619 if ( iFs.Drive( drvInfo, i ) == KErrNone ) |
|
620 { |
|
621 if ( drvInfo.iDriveAtt & aAttMask ) |
|
622 { |
|
623 append = ETrue; |
|
624 } |
|
625 } |
|
626 if ( append ) |
|
627 { |
|
628 aDrives.Append( i ); |
|
629 } |
|
630 } |
|
631 } |
|
632 } |
|
633 |
|
634 // ----------------------------------------------------------------------------- |
|
635 // CFileManagerUtils::IsRemovableDrive |
|
636 // |
|
637 // ----------------------------------------------------------------------------- |
|
638 // |
|
639 TBool CFileManagerUtils::IsRemovableDrive( const TDesC& aPath ) const |
|
640 { |
|
641 return IsDrive( iFs, aPath, KDriveAttRemovable ); |
|
642 } |
|
643 |
|
644 // ----------------------------------------------------------------------------- |
|
645 // CFileManagerUtils::GetFullPath |
|
646 // ----------------------------------------------------------------------------- |
|
647 // |
|
648 void CFileManagerUtils::GetFullPath( |
|
649 const TDesC& aDir, const TEntry& aEntry, TDes& aFullPath ) |
|
650 { |
|
651 GflmUtils::GetFullPath( aDir, aEntry, aFullPath ); |
|
652 } |
|
653 |
|
654 // ----------------------------------------------------------------------------- |
|
655 // CFileManagerUtils::StripFinalBackslash |
|
656 // ----------------------------------------------------------------------------- |
|
657 // |
|
658 EXPORT_C TPtrC CFileManagerUtils::StripFinalBackslash( const TDesC& aPath ) |
|
659 { |
|
660 return GflmUtils::StripFinalBackslash( aPath ); |
|
661 } |
|
662 |
|
663 // ----------------------------------------------------------------------------- |
|
664 // CFileManagerUtils::EnsureFinalBackslash |
|
665 // ----------------------------------------------------------------------------- |
|
666 // |
|
667 EXPORT_C void CFileManagerUtils::EnsureFinalBackslash( TDes& aPath ) |
|
668 { |
|
669 GflmUtils::EnsureFinalBackslash( aPath ); |
|
670 } |
|
671 |
|
672 // ----------------------------------------------------------------------------- |
|
673 // CFileManagerUtils::StripDirectionalCharsLC |
|
674 // ----------------------------------------------------------------------------- |
|
675 // |
|
676 HBufC* CFileManagerUtils::StripDirectionalCharsLC( const TDesC& aText ) |
|
677 { |
|
678 HBufC* text = aText.AllocLC(); |
|
679 TPtr ptr( text->Des() ); |
|
680 AknTextUtils::StripCharacters( ptr, KFmgrDirectionalChars ); |
|
681 return text; |
|
682 } |
|
683 |
|
684 // ----------------------------------------------------------------------------- |
|
685 // CFileManagerUtils::IsFlkOrLdfFileL |
|
686 // ----------------------------------------------------------------------------- |
|
687 // |
|
688 void CFileManagerUtils::IsFlkOrLdfFileL( |
|
689 const TDesC& aFullPath, TBool& aIsFlk, TBool& aIsLdf ) |
|
690 { |
|
691 aIsFlk = EFalse; |
|
692 aIsLdf = EFalse; |
|
693 ContentAccess::CContent* content = |
|
694 ContentAccess::CContent::CContent::NewLC( |
|
695 aFullPath, EContentShareReadOnly ); |
|
696 HBufC* contentId = HBufC::NewLC( KMaxFileName ); |
|
697 TPtr ptrContentId( contentId->Des() ); |
|
698 TInt err( content->GetStringAttribute( |
|
699 ContentAccess::EContentID, ptrContentId ) ); |
|
700 if ( err != KErrNone && err != KErrCANotSupported ) |
|
701 { |
|
702 User::Leave( err ); |
|
703 } |
|
704 if ( !ptrContentId.Left( KFlk().Length() ).Compare( KFlk ) ) |
|
705 { |
|
706 aIsFlk = ETrue; |
|
707 } |
|
708 else if ( !ptrContentId.Left( KLdf().Length() ).Compare( KLdf ) ) |
|
709 { |
|
710 aIsLdf = ETrue; |
|
711 } |
|
712 CleanupStack::PopAndDestroy( contentId ); |
|
713 CleanupStack::PopAndDestroy( content ); |
|
714 } |
|
715 |
|
716 // ----------------------------------------------------------------------------- |
|
717 // CFileManagerUtils::HasFinalBackslash |
|
718 // ----------------------------------------------------------------------------- |
|
719 // |
|
720 EXPORT_C TBool CFileManagerUtils::HasFinalBackslash( const TDesC& aPath ) |
|
721 { |
|
722 return GflmUtils::HasFinalBackslash( aPath ); |
|
723 } |
|
724 |
|
725 // ----------------------------------------------------------------------------- |
|
726 // CFileManagerUtils::IsInternalDrive |
|
727 // ----------------------------------------------------------------------------- |
|
728 // |
|
729 TBool CFileManagerUtils::IsInternalDrive( RFs& aFs, const TInt aDrive ) |
|
730 { |
|
731 return IsDrive( aFs, aDrive, KDriveAttInternal ); |
|
732 } |
|
733 |
|
734 // ----------------------------------------------------------------------------- |
|
735 // CFileManagerUtils::IsFromInternalToRemovableDrive |
|
736 // ----------------------------------------------------------------------------- |
|
737 // |
|
738 EXPORT_C TBool CFileManagerUtils::IsFromInternalToRemovableDrive( |
|
739 RFs& aFs, const TDesC& aSrcPath, const TDesC& aDstPath ) |
|
740 { |
|
741 TInt srcDrv = TDriveUnit( aSrcPath ); |
|
742 TInt dstDrv = TDriveUnit( aDstPath ); |
|
743 if ( srcDrv == dstDrv ) |
|
744 { |
|
745 return EFalse; |
|
746 } |
|
747 return ( IsInternalDrive( aFs, srcDrv ) && |
|
748 !IsInternalDrive( aFs, dstDrv ) ); |
|
749 } |
|
750 |
|
751 // ----------------------------------------------------------------------------- |
|
752 // CFileManagerUtils::RemoveReadOnlyAttribute |
|
753 // ----------------------------------------------------------------------------- |
|
754 // |
|
755 TInt CFileManagerUtils::RemoveReadOnlyAttribute( |
|
756 RFs& aFs, const TDesC& aFullPath, const TEntry& aEntry ) |
|
757 { |
|
758 TInt ret( KErrNone ); |
|
759 if( aEntry.IsReadOnly() ) |
|
760 { |
|
761 ret = aFs.SetEntry( |
|
762 aFullPath, aEntry.iModified, 0, KEntryAttReadOnly ); |
|
763 } |
|
764 return ret; |
|
765 } |
|
766 |
|
767 // ----------------------------------------------------------------------------- |
|
768 // CFileManagerUtils::RemoveReadOnlyAttribute |
|
769 // ----------------------------------------------------------------------------- |
|
770 // |
|
771 TInt CFileManagerUtils::RemoveReadOnlyAttribute( |
|
772 RFs& aFs, const TDesC& aFullPath ) |
|
773 { |
|
774 TEntry entry; |
|
775 TInt ret( aFs.Entry( aFullPath, entry ) ); |
|
776 if ( ret == KErrNone ) |
|
777 { |
|
778 ret = RemoveReadOnlyAttribute( aFs, aFullPath, entry ); |
|
779 } |
|
780 return ret; |
|
781 } |
|
782 |
|
783 #ifdef RD_MULTIPLE_DRIVE |
|
784 // ----------------------------------------------------------------------------- |
|
785 // CFileManagerUtils::GetDriveNameArrayLC |
|
786 // ----------------------------------------------------------------------------- |
|
787 // |
|
788 CDesCArray* CFileManagerUtils::GetDriveNameArrayLC( |
|
789 const TInt aDrive, TUint& aDriveStatus ) const |
|
790 { |
|
791 CGflmDriveItem* drvItem = iNavigator.DriveFromId( aDrive ); |
|
792 if ( !drvItem ) |
|
793 { |
|
794 User::Leave( KErrNotFound ); |
|
795 } |
|
796 aDriveStatus = drvItem->DriveStatus(); |
|
797 CDesCArray* ret = new( ELeave ) CDesCArrayFlat( KDriveNameArrayLen ); |
|
798 CleanupStack::PushL( ret ); |
|
799 ret->AppendL( TDriveUnit( aDrive ).Name() ); |
|
800 |
|
801 if ( aDriveStatus & DriveInfo::EDriveInternal ) |
|
802 { |
|
803 // Device memory and mass storage drives |
|
804 return ret; |
|
805 } |
|
806 // Other drives |
|
807 TPtrC drvName( drvItem->Name() ); |
|
808 if ( drvName.Length() ) |
|
809 { |
|
810 ret->AppendL( drvName ); |
|
811 } |
|
812 return ret; |
|
813 } |
|
814 |
|
815 // ----------------------------------------------------------------------------- |
|
816 // CFileManagerUtils::GetDriveNameL |
|
817 // ----------------------------------------------------------------------------- |
|
818 // |
|
819 HBufC* CFileManagerUtils::GetDriveNameL( |
|
820 const TInt aDrive, const TDriveNameLayout aLayout ) const |
|
821 { |
|
822 if ( aLayout < 0 || aLayout >= ELayoutCount ) |
|
823 { |
|
824 User::Leave( KErrArgument ); |
|
825 } |
|
826 TUint driveStatus( 0 ); |
|
827 CDesCArray* array = GetDriveNameArrayLC( aDrive, driveStatus ); |
|
828 HBufC* ret = NULL; |
|
829 if ( driveStatus & DriveInfo::EDriveInternal ) |
|
830 { |
|
831 // Device memory and mass storage drives |
|
832 if ( driveStatus & DriveInfo::EDriveExternallyMountable ) |
|
833 { |
|
834 ret = StringLoader::LoadL( |
|
835 KFmgrDriveNames[ aLayout ][ EFmgrMassStorage ], |
|
836 array->MdcaPoint( KDriveLetterIndex ) ); |
|
837 } |
|
838 else |
|
839 { |
|
840 ret = StringLoader::LoadL( |
|
841 KFmgrDriveNames[ aLayout ][ EFmgrDeviceMemory ], |
|
842 array->MdcaPoint( KDriveLetterIndex ) ); |
|
843 } |
|
844 } |
|
845 else if ( driveStatus & DriveInfo::EDriveRemovable ) |
|
846 { |
|
847 // Physically removable drives |
|
848 if ( array->MdcaCount() > 1 ) |
|
849 { |
|
850 ret = StringLoader::LoadL( |
|
851 KFmgrDriveNames[ aLayout ][ EFmgrNamedMemoryCard ], |
|
852 *array ); |
|
853 } |
|
854 else |
|
855 { |
|
856 TInt driveType( EFmgrDefaultMemoryCard ); |
|
857 if ( driveStatus & DriveInfo::EDriveUsbMemory ) |
|
858 { |
|
859 driveType = EFmgrDefaultUsbMemory; |
|
860 } |
|
861 ret = StringLoader::LoadL( |
|
862 KFmgrDriveNames[ aLayout ][ driveType ], |
|
863 array->MdcaPoint( KDriveLetterIndex ) ); |
|
864 } |
|
865 } |
|
866 else if ( array->MdcaCount() > 1 ) |
|
867 { |
|
868 // Other drives |
|
869 ret = array->MdcaPoint( KDriveNameIndex ).AllocL(); |
|
870 } |
|
871 else |
|
872 { |
|
873 User::Leave( KErrNotFound ); |
|
874 } |
|
875 CleanupStack::PopAndDestroy( array ); |
|
876 return ret; |
|
877 } |
|
878 |
|
879 // ----------------------------------------------------------------------------- |
|
880 // CFileManagerUtils::GetFormattedDriveNameLC |
|
881 // ----------------------------------------------------------------------------- |
|
882 // |
|
883 HBufC* CFileManagerUtils::GetFormattedDriveNameLC( |
|
884 const TInt aDrive, |
|
885 const TInt aTextIdForDefaultName, |
|
886 const TInt aTextIdForName ) const |
|
887 { |
|
888 TUint driveStatus( 0 ); |
|
889 HBufC* ret = NULL; |
|
890 CDesCArray* array = GetDriveNameArrayLC( aDrive, driveStatus ); |
|
891 if ( aTextIdForName && array->MdcaCount() > 1 ) |
|
892 { |
|
893 ret = StringLoader::LoadL( |
|
894 aTextIdForName, |
|
895 *array ); |
|
896 } |
|
897 else if ( aTextIdForDefaultName ) |
|
898 { |
|
899 if( driveStatus & DriveInfo::EDriveUsbMemory ) |
|
900 { |
|
901 CDesCArray* usbLetterName = new ( ELeave ) CDesCArrayFlat( KDriveNameArrayLen ); |
|
902 CleanupStack::PushL( usbLetterName ); |
|
903 |
|
904 TPtrC16 driveletter=array->MdcaPoint( KDriveLetterIndex ); |
|
905 usbLetterName->AppendL( driveletter ); |
|
906 |
|
907 if(array->MdcaCount() > 1 ) |
|
908 { |
|
909 TPtrC16 drivename=array->MdcaPoint( KDriveNameIndex ); |
|
910 usbLetterName->AppendL( drivename ); |
|
911 } |
|
912 else |
|
913 { |
|
914 TPtrC16 drivename=_L(""); |
|
915 usbLetterName->AppendL( drivename ); |
|
916 } |
|
917 |
|
918 |
|
919 ret = StringLoader::LoadL( |
|
920 aTextIdForDefaultName,*usbLetterName ); |
|
921 |
|
922 CleanupStack::PopAndDestroy( usbLetterName ); |
|
923 } |
|
924 else |
|
925 { |
|
926 ret = StringLoader::LoadL(aTextIdForDefaultName, array->MdcaPoint( |
|
927 KDriveLetterIndex)); |
|
928 } |
|
929 } |
|
930 else if ( array->MdcaCount() > 1 ) |
|
931 { |
|
932 ret = array->MdcaPoint( KDriveNameIndex ).AllocL(); |
|
933 } |
|
934 else |
|
935 { |
|
936 User::Leave( KErrNotFound ); |
|
937 } |
|
938 CleanupStack::PopAndDestroy( array ); |
|
939 CleanupStack::PushL( ret ); |
|
940 return ret; |
|
941 } |
|
942 |
|
943 #endif // RD_MULTIPLE_DRIVE |
|
944 |
|
945 // ----------------------------------------------------------------------------- |
|
946 // CFileManagerUtils::IsRemoteDrive |
|
947 // ----------------------------------------------------------------------------- |
|
948 EXPORT_C TBool CFileManagerUtils::IsRemoteDrive( |
|
949 RFs& aFs, const TDesC& aPath ) |
|
950 { |
|
951 return IsDrive( aFs, aPath, KDriveAttRemote ); |
|
952 } |
|
953 |
|
954 // ----------------------------------------------------------------------------- |
|
955 // CFileManagerUtils::IsDrive |
|
956 // ----------------------------------------------------------------------------- |
|
957 TBool CFileManagerUtils::IsDrive( |
|
958 RFs& aFs, const TDesC& aPath, const TUint aAttMask ) |
|
959 { |
|
960 TInt drv( 0 ); |
|
961 if ( aPath.Length() && |
|
962 RFs::CharToDrive( aPath[ 0 ], drv ) == KErrNone ) |
|
963 { |
|
964 return IsDrive( aFs, drv, aAttMask ); |
|
965 } |
|
966 return EFalse; |
|
967 } |
|
968 |
|
969 // ----------------------------------------------------------------------------- |
|
970 // CFileManagerUtils::IsDrive |
|
971 // ----------------------------------------------------------------------------- |
|
972 TBool CFileManagerUtils::IsDrive( |
|
973 RFs& aFs, const TInt aDrive, const TUint aAttMask ) |
|
974 { |
|
975 TDriveInfo drvInfo; |
|
976 if ( aFs.Drive( drvInfo, aDrive ) == KErrNone ) |
|
977 { |
|
978 if ( drvInfo.iDriveAtt & aAttMask ) |
|
979 { |
|
980 return ETrue; |
|
981 } |
|
982 } |
|
983 return EFalse; |
|
984 } |
|
985 |
|
986 // ------------------------------------------------------------------------------ |
|
987 // CFileManagerUtils::LocalizedName |
|
988 // |
|
989 // ------------------------------------------------------------------------------ |
|
990 // |
|
991 TPtrC CFileManagerUtils::LocalizedName( const TDesC& aFullPath ) const |
|
992 { |
|
993 return iNavigator.LocalizedName( aFullPath ); |
|
994 } |
|
995 |
|
996 // ----------------------------------------------------------------------------- |
|
997 // CFileManagerUtils::IsNameFoundL |
|
998 // ----------------------------------------------------------------------------- |
|
999 // |
|
1000 TBool CFileManagerUtils::IsNameFoundL( const TDesC& aFullPath ) const |
|
1001 { |
|
1002 TParsePtrC parse( CFileManagerUtils::StripFinalBackslash( aFullPath ) ); |
|
1003 TPtrC baseDir( parse.DriveAndPath() ); |
|
1004 TPtrC currentDir( iNavigator.CurrentDirectory() ); |
|
1005 TBool ret( EFalse ); |
|
1006 HBufC* name1 = CFileManagerUtils::StripDirectionalCharsLC( parse.NameAndExt() ); |
|
1007 // Remove white spaces from end, file server also ignores those |
|
1008 name1->Des().TrimRight(); |
|
1009 if ( !parse.PathPresent() || |
|
1010 ( currentDir.Length() && !currentDir.CompareF( baseDir ) ) ) |
|
1011 { |
|
1012 TBool searchmode = iNavigator.SearchMode(); |
|
1013 iNavigator.EnableSearchMode( EFalse ); |
|
1014 // Do check from current directory, all items are cached |
|
1015 TInt count( iNavigator.MdcaCount() ); |
|
1016 for( TInt i( 0 ); i < count; ++i ) |
|
1017 { |
|
1018 CGflmGroupItem* item = iNavigator.Item( i ); |
|
1019 TInt itemType( item->Type() ); |
|
1020 switch (itemType ) |
|
1021 { |
|
1022 case CGflmGroupItem::EFile: // FALLTHROUGH |
|
1023 case CGflmGroupItem::EDirectory: |
|
1024 { |
|
1025 // Compare with file system name |
|
1026 CGflmFileSystemItem* fsItem = |
|
1027 static_cast< CGflmFileSystemItem* >( item ); |
|
1028 HBufC* name2 = CFileManagerUtils::StripDirectionalCharsLC( |
|
1029 fsItem->Entry().iName ); |
|
1030 ret = !( name1->CompareF( *name2 ) ); |
|
1031 CleanupStack::PopAndDestroy( name2 ); |
|
1032 if ( !ret && itemType == CGflmGroupItem::EDirectory ) |
|
1033 { |
|
1034 // Compare with localized name |
|
1035 name2 = CFileManagerUtils::StripDirectionalCharsLC( |
|
1036 fsItem->Name() ); |
|
1037 if ( name2->Length() ) |
|
1038 { |
|
1039 ret = !( name1->CompareF( *name2 ) ); |
|
1040 } |
|
1041 CleanupStack::PopAndDestroy( name2 ); |
|
1042 } |
|
1043 break; |
|
1044 } |
|
1045 default: |
|
1046 { |
|
1047 break; |
|
1048 } |
|
1049 } |
|
1050 if ( ret ) |
|
1051 { |
|
1052 break; |
|
1053 } |
|
1054 } |
|
1055 iNavigator.EnableSearchMode( searchmode ); |
|
1056 } |
|
1057 else |
|
1058 { |
|
1059 // Do check from any directory |
|
1060 HBufC* buffer = HBufC::NewLC( |
|
1061 Max( KMaxFileName, aFullPath.Length() + KFmgrBackslashSpace ) ); |
|
1062 TPtr ptr( buffer->Des() ); |
|
1063 ptr.Copy( aFullPath ); |
|
1064 CFileManagerUtils::EnsureFinalBackslash( ptr ); |
|
1065 ret = ( BaflUtils::FolderExists( iFs, ptr ) || |
|
1066 BaflUtils::FileExists( iFs, |
|
1067 CFileManagerUtils::StripFinalBackslash( aFullPath ) ) ); |
|
1068 if ( !ret && |
|
1069 !IsRemoteDrive( aFullPath ) && |
|
1070 BaflUtils::PathExists( iFs, baseDir ) ) |
|
1071 { |
|
1072 // Check directory for localized items on local drives |
|
1073 CDir* dir = NULL; |
|
1074 User::LeaveIfError( iFs.GetDir( |
|
1075 baseDir, KEntryAttMatchMask | KEntryAttNormal, ESortNone, dir ) ); |
|
1076 CleanupStack::PushL( dir ); |
|
1077 ptr.Zero(); |
|
1078 TInt count( dir->Count() ); |
|
1079 for ( TInt i ( 0 ); i < count; ++i ) |
|
1080 { |
|
1081 HBufC* name2 = NULL; |
|
1082 const TEntry& entry( ( *dir )[ i ] ); |
|
1083 if( entry.IsDir() ) |
|
1084 { |
|
1085 // Compare with localized name |
|
1086 CFileManagerUtils::GetFullPath( baseDir, entry, ptr ); |
|
1087 TPtrC ptr2( iNavigator.LocalizedName( ptr ) ); |
|
1088 if ( ptr2.Length() ) |
|
1089 { |
|
1090 name2 = CFileManagerUtils::StripDirectionalCharsLC( ptr2 ); |
|
1091 } |
|
1092 } |
|
1093 if ( !name2 ) |
|
1094 { |
|
1095 // Compare with file system name |
|
1096 name2 = CFileManagerUtils::StripDirectionalCharsLC( entry.iName ); |
|
1097 } |
|
1098 ret = !( name1->CompareF( *name2 ) ); |
|
1099 CleanupStack::PopAndDestroy( name2 ); |
|
1100 if ( ret ) |
|
1101 { |
|
1102 break; |
|
1103 } |
|
1104 } |
|
1105 CleanupStack::PopAndDestroy( dir ); |
|
1106 } |
|
1107 CleanupStack::PopAndDestroy( buffer ); |
|
1108 } |
|
1109 CleanupStack::PopAndDestroy( name1 ); |
|
1110 return ret; |
|
1111 } |
|
1112 // ----------------------------------------------------------------------------- |
|
1113 // CFileManagerUtils::FlushCache |
|
1114 // ----------------------------------------------------------------------------- |
|
1115 // |
|
1116 void CFileManagerUtils::FlushCache() const |
|
1117 { |
|
1118 iNavigator.FlushCache(); |
|
1119 } |
|
1120 |
|
1121 // End of File |