Namespaces
Variants
Actions

Scanning folders & subfolders in Symbian devices

Jump to: navigation, search
Article Metadata

Article
Created: bharatuppal (23 Jul 2007)
Updated: mayur_24 (29 Aug 2012)
Last edited: hamishwillee (03 Sep 2012)
Location: f32file.h 
Link against: efsrv.lib
TBuf<256> defaultImagesPath(_L("c:\\data\\images\\"));
CDir* presentFolder = NULL;
TFileName filteredImages( defaultImagesPath );
// valid Directory in the file system tree
// this version will only work with UI apps as we are using the CEikonEnv
CDirScan* scanner = CDirScan::NewLC(iEikonEnv->FsSession());
scanner->SetScanDataL(filteredImages, KEntryAttNormal, ESortByDate,CDirScan::EScanDownTree);
scanner->NextL(presentFolder);
while (presentFolder)
{
for(TInt index(0); index < presentFolder->Count() ;index++)
{
TEntry presentEntry = (*presentFolder)[index];
if( !presentEntry.IsDir() )
{
/* presentEntry points to content or file inside the folder
so do any operation */

}
 
}
delete presentFolder;
scanner->NextL(presentFolder);
}
CleanupStack::PopAndDestroy(1);//scanner
This page was last modified on 3 September 2012, at 07:39.
151 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved