Symbian3/SDK/Source/GUID-3CE3D01D-3EA1-5D44-B9DE-350F9E88F9C9.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-3CE3D01D-3EA1-5D44-B9DE-350F9E88F9C9" xml:lang="en"><title>Structure
       
    13 of paths and filenames</title><shortdesc>This topic describes the structure of path and the components of
       
    14 a filename.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>A full filename consists of four components:</p>
       
    16 <ul>
       
    17 <li id="GUID-FA2E4BB1-3228-5E88-8F78-0BF7EAB14E8B"><p>the drive: a single
       
    18 letter followed by a colon.</p> </li>
       
    19 <li id="GUID-E98DCE36-6BFA-57E4-A03F-8CAB1CE587D1"><p>the path, starting with
       
    20 a backslash and ending with the final backslash in the name. The backslashes
       
    21 divide the path into components.</p> </li>
       
    22 <li id="GUID-32B125E6-9328-5AF0-AEBE-9D64CA801B61"><p>the file name: everything
       
    23 from the character following the last backslash to the character preceding
       
    24 the final dot.</p> </li>
       
    25 <li id="GUID-33B61BC0-F53C-5D50-840A-1EB1B6015227"><p>the extension, which
       
    26 consists of everything after the final dot.</p> </li>
       
    27 </ul>
       
    28 <p>In "8.3" filing systems such as FAT, the meanings of these components are
       
    29 well understood. In non-8.3 systems, the mapping is straightforward, except
       
    30 for the split of the final component of the name between filename and extension.
       
    31 The rule is that anything following the final dot of this component is the
       
    32 extension, anything preceding it is the filename. If there is no dot, or nothing
       
    33 after the final dot, the entire component is the filename, and there is no
       
    34 extension.</p>
       
    35 <p>The following table shows some sample filenames and their component parts:</p>
       
    36 <table id="GUID-395954AC-FB20-5AED-89B2-ADC20F99E435">
       
    37 <tgroup cols="5"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/><colspec colname="col3"/><colspec colname="col4"/>
       
    38 <tbody>
       
    39 <row>
       
    40 <entry><p>Full name</p> </entry>
       
    41 <entry><p>Drive</p> </entry>
       
    42 <entry><p>Path</p> </entry>
       
    43 <entry><p>Filename</p> </entry>
       
    44 <entry><p>Extension</p> </entry>
       
    45 </row>
       
    46 <row>
       
    47 <entry><p><filepath>d:\path\fn.ext</filepath> </p> </entry>
       
    48 <entry><p><filepath>d:</filepath> </p> </entry>
       
    49 <entry><p><filepath>\path\</filepath> </p> </entry>
       
    50 <entry><p><filepath>fn</filepath> </p> </entry>
       
    51 <entry><p><filepath>.ext</filepath> </p> </entry>
       
    52 </row>
       
    53 <row>
       
    54 <entry><p><filepath>autoexec.bat</filepath> </p> </entry>
       
    55 <entry/>
       
    56 <entry/>
       
    57 <entry><p><filepath>autoexec</filepath> </p> </entry>
       
    58 <entry><p><filepath>.bat</filepath> </p> </entry>
       
    59 </row>
       
    60 <row>
       
    61 <entry><p><filepath>c:\readme</filepath> </p> </entry>
       
    62 <entry><p><filepath>c:</filepath> </p> </entry>
       
    63 <entry><p>\</p> </entry>
       
    64 <entry><p><filepath>readme</filepath> </p> </entry>
       
    65 <entry/>
       
    66 </row>
       
    67 <row>
       
    68 <entry><p><filepath>c:readme</filepath> </p> </entry>
       
    69 <entry><p><filepath>c:</filepath> </p> </entry>
       
    70 <entry/>
       
    71 <entry><p><filepath>readme</filepath> </p> </entry>
       
    72 <entry/>
       
    73 </row>
       
    74 <row>
       
    75 <entry><p><filepath>.profile</filepath> </p> </entry>
       
    76 <entry/>
       
    77 <entry/>
       
    78 <entry/>
       
    79 <entry><p><filepath>.profile</filepath> </p> </entry>
       
    80 </row>
       
    81 <row>
       
    82 <entry><p><filepath>..</filepath> </p> </entry>
       
    83 <entry/>
       
    84 <entry/>
       
    85 <entry><p><filepath>..</filepath> </p> </entry>
       
    86 <entry/>
       
    87 </row>
       
    88 </tbody>
       
    89 </tgroup>
       
    90 </table>
       
    91 <p>Note that not all parts need be present. Note also that the directory navigators <filepath>..</filepath> and <filepath>.</filepath> are
       
    92 not an intrinsic part of the file system model, and are not therefore supported
       
    93 directly in names.</p>
       
    94 <p>A directory is identified by a trailing slash: thus, <filepath>c:\wrd\</filepath> indicates
       
    95 a directory, but <filepath>c:\wrd</filepath> indicates a file with no extension.
       
    96 This mandatory requirement allows parsing to function without ambiguity, and
       
    97 also without reference to any session with the file server.</p>
       
    98 <p>The classes described here are used to handle all filename parsing requirements
       
    99 in a uniform way. Because they handle the logic consistently, and because
       
   100 this logic contains some subtle rules, you should always use them rather than
       
   101 writing your own code.</p>
       
   102 </conbody></concept>