Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Structure of paths and filenames

A full filename consists of four components:

In "8.3" filing systems such as FAT, the meanings of these components are well understood. In non-8.3 systems, the mapping is straightforward, except for the split of the final component of the name between filename and extension. The rule is that anything following the final dot of this component is the extension, anything preceding it is the filename. If there is no dot, or nothing after the final dot, the entire component is the filename, and there is no extension.

The following table shows some sample filenames and their component parts:

Full name

Drive

Path

Filename

Extension

d:\path\fn.ext

d:

\path\

fn

.ext

autoexec.bat

autoexec

.bat

c:\readme

c:

\

readme

c:readme

c:

readme

.profile

.profile

..

..

Note that not all parts need be present. Note also that the directory navigators .. and . are not an intrinsic part of the file system model, and are not therefore supported directly in names.

A directory is identified by a trailing slash: thus, c:\wrd\ indicates a directory, but c:\wrd indicates a file with no extension. This mandatory requirement allows parsing to function without ambiguity, and also without reference to any session with the file server.

The classes described here are used to handle all filename parsing requirements in a uniform way. Because they handle the logic consistently, and because this logic contains some subtle rules, you should always use them rather than writing your own code.