Symbian3/SDK/Source/GUID-D5B8DC2A-E2BA-54FE-A359-1496356AF93F.dita
changeset 7 51a74ef9ed63
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-D5B8DC2A-E2BA-54FE-A359-1496356AF93F" xml:lang="en"><title>How
       
    13 to delete files and directories</title><shortdesc>This topic describes how to delete an empty directory and a file.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>Use <codeph>RmDir()</codeph> to delete an empty directory. Use <codeph>Delete()</codeph> to
       
    15 delete a file. </p>
       
    16 <codeblock id="GUID-9673872B-2952-5076-AA8D-F8E2B3E5AFA6" xml:space="preserve">
       
    17 // Deletes KTopDir, deleting all files and sub-directories first
       
    18 User::LeaveIfError(fsSession.Delete(KFile2));
       
    19 User::LeaveIfError(fsSession.RmDir(KDir1));
       
    20 User::LeaveIfError(fsSession.RmDir(KDir2));
       
    21 User::LeaveIfError(fsSession.Delete(KFile1));
       
    22 User::LeaveIfError(fsSession.RmDir(KTopDir)); ... </codeblock>
       
    23 <section id="GUID-589A7DF6-2D82-43F1-BAAF-E7804E2A422D"><note><ul>
       
    24 <li id="GUID-DC2A9104-5B7E-5481-8368-461DFC8B230F"><p>Files must be closed
       
    25 and must not be read-only in order to be deleted. </p> </li>
       
    26 <li id="GUID-DF4CF5BA-BC2E-51DB-8264-0FF0538ADD74"><p> <xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita#GUID-E263C747-946F-35AA-9F1D-41833BD350FC/GUID-C28319AD-2CC7-3009-9707-51C9EF02C51B"><apiname>RFs::Delete()</apiname></xref> does
       
    27 not accept the use of <keyword>wildcards</keyword>. To delete multiple files,
       
    28 use <xref href="GUID-82CEC14F-1479-3922-846A-9FCDB6465EF7.dita#GUID-82CEC14F-1479-3922-846A-9FCDB6465EF7/GUID-71056B22-AC2A-3E91-8896-8A6F2FB9B619"><apiname>CFileMan::Delete()</apiname></xref> instead. </p> </li>
       
    29 </ul></note> </section>
       
    30 </conbody></concept>