Symbian3/SDK/Source/GUID-B563AC07-A54B-50E2-A3B2-821E8BC2C863.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-B563AC07-A54B-50E2-A3B2-821E8BC2C863" xml:lang="en"><title>Using
       
    13 CDirScan</title><shortdesc>This topic describes about setting up the scan and
       
    14 parsing path.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <section id="GUID-838F2F37-69AE-49B6-970E-FFF29B93709E"><title>Setting up the scan using SetScanDataL()</title> <fig id="GUID-CC897DCB-73B0-53A4-B1AA-351DF18F0AE0">
       
    16 <image href="GUID-3F172A97-8B96-5E1B-854C-F198D1334D2A_d0e263982_href.png" placement="inline"/>
       
    17 </fig> <p>Taking the above directory structure, if <codeph>SetScanData()</codeph> is
       
    18 called as follows:</p> <codeblock id="GUID-B6CEF818-9044-58B9-BEBF-EB05BE6F89A9" xml:space="preserve">_LIT(KDirText,"C:\\TopDir\\");
       
    19 ...
       
    20 SetScanDataL(KDirText,KEntryAttDir,ESortByName|EAscending,CDirScan::EScanDownTree);
       
    21 ...</codeblock> <p>then the directories are scanned, by repeatedly calling <codeph>CDirScan::NextL()</codeph> in
       
    22 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>.
       
    23 The sort key of <codeph>EAscending</codeph> means that multiple directories
       
    24 within the same parent directory are scanned in ascending alphabetic or numeric
       
    25 order.</p> <p>If the scan direction is upwards, i.e.<codeph>CDirScan::EScanUpTree</codeph>,
       
    26 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>
       
    27 <section id="GUID-890778ED-0009-40C1-A1AC-FBCF2F137FF6"><title>Parsing paths using FullPath()</title> <p>If the full path
       
    28 of the entry currently being scanned is:</p> <p><filepath>C:\Topdir\Middledir\Bottomdir\</filepath> </p> <p>and
       
    29 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>
       
    30 <li id="GUID-016B0C1F-D5BD-53D7-82F0-9393B3B45FD7"><p><codeph>AbbreviatedPath()</codeph> returns <filepath>\Middledir\</filepath> </p> </li>
       
    31 <li id="GUID-80ECD7D1-9532-5ED3-8CBD-2A9E6F04C067"><p><codeph>FullPath()</codeph> returns <filepath>C:\Topdir\Middledir\</filepath>.</p> </li>
       
    32 </ul> </section>
       
    33 </conbody></concept>