Symbian3/SDK/Source/GUID-B563AC07-A54B-50E2-A3B2-821E8BC2C863.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-B563AC07-A54B-50E2-A3B2-821E8BC2C863.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept xml:lang="en" id="GUID-B563AC07-A54B-50E2-A3B2-821E8BC2C863"><title>Using CDirScan</title><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Setting up the scan using SetScanDataL()</title> <fig id="GUID-CC897DCB-73B0-53A4-B1AA-351DF18F0AE0"><image href="GUID-3F172A97-8B96-5E1B-854C-F198D1334D2A_d0e235933_href.png" placement="inline"/></fig> <p>Taking the above directory structure, if <codeph>SetScanData()</codeph> is called as follows:</p> <codeblock id="GUID-B6CEF818-9044-58B9-BEBF-EB05BE6F89A9" xml:space="preserve">_LIT(KDirText,"C:\\TopDir\\");
+...
+SetScanDataL(KDirText,KEntryAttDir,ESortByName|EAscending,CDirScan::EScanDownTree);
+...</codeblock> <p>then the directories are scanned, by repeatedly calling <codeph>CDirScan::NextL()</codeph> in the following order: <filepath>TopDir</filepath>, <filepath>Dir1</filepath>, <filepath>Dir2</filepath>, <filepath>Dir3</filepath>, <filepath>Dir4</filepath>, <filepath>Dir5</filepath>, <filepath>Dir6</filepath>, <filepath>Dir7</filepath>. The sort key of <codeph>EAscending</codeph> means that multiple directories within the same parent directory are scanned in ascending alphabetic or numeric order.</p> <p>If the scan direction is upwards, i.e.<codeph>CDirScan::EScanUpTree</codeph>, the directories are scanned in the order: <filepath>Dir2</filepath>, <filepath>Dir4</filepath>, <filepath>Dir3</filepath>, <filepath>Dir1</filepath>, <filepath>Dir6</filepath>, <filepath>Dir7</filepath>, <filepath>Dir5</filepath>, <filepath>TopDir</filepath>.</p> </section> <section><title>Parsing paths using FullPath()</title> <p>If the full path of the entry currently being scanned is:</p> <p><filepath>C:\Topdir\Middledir\Bottomdir\</filepath> </p> <p>and the top level directory in the scan as passed to <codeph>SetScanDataL()</codeph> is:</p> <p><filepath>C:\Topdir\</filepath> </p> <p>then:</p> <ul><li id="GUID-016B0C1F-D5BD-53D7-82F0-9393B3B45FD7"><p><codeph>AbbreviatedPath()</codeph> returns <filepath>\Middledir\</filepath> </p> </li> <li id="GUID-80ECD7D1-9532-5ED3-8CBD-2A9E6F04C067"><p><codeph>FullPath()</codeph> returns <filepath>C:\Topdir\Middledir\</filepath>.</p> </li> </ul> </section> </conbody></concept>
\ No newline at end of file