Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: f32file.h
Link against: efsrv.lib

Class TParse

TParse

Support

Supported from 5.0

Description

Parses filenames. The class uses the full filename structure supported by EPOC.

TParse works by using the Set() function to set up the filename to be parsed, and then various getter functions defined in the base class, TParseBase such as FullName(), Drive(), Path(), DriveAndPath(), Name(), Ext() and NameAndExt() may be used to retrieve components of it.

There are a number of restrictions to valid path components, which are described in the “Using” section. If any are violated, TParse returns KErrBadName.

Derivation

TParseParses filenames
TParseBaseBase class for file name parsing

Defined in TParse:
Set(), SetNoWild()

Inherited from TParseBase:
AddDir(), Drive(), DriveAndPath(), DrivePresent(), Ext(), ExtPresent(), FullName(), IsExtWild(), IsKMatchAny(), IsKMatchOne(), IsNameWild(), IsRoot(), IsWild(), Name(), NameAndExt(), NameOrExtPresent(), NamePresent(), Path(), PathPresent(), PopDir()

See also:


Setting up the parse


Set()

TInt Set(const TDesC& aName,const TDesC* aRelated,const TDesC* aDefault);

Description

Parses a file specification allowing wildcards in the filename and extension. This function sets up the TParse object so that it can be used to provide useful information.

Parameters

const TDesC& aName

The file specification to be parsed.

const TDesC* aRelated

The related file specification — optional: set to NULL to omit.

const TDesC* aDefault

The default file specification — optional: set to NULL to omit.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

See also:


SetNoWild()

TInt SetNoWild(const TDesC& aName,const TDesC* aRelated,const TDesC* aDefault);

Description

Parses a file specification; disallows wildcards in any part of the file name or extension. If you need to specify wildcards use Set(). Otherwise, this function operates in the same way as Set().

Parameters

const TDesC& aName

The file specification to be parsed.

const TDesC* aRelated

The related file specification — optional: set to NULL to omit

const TDesC* aDefault

The default file specification — optional: set to NULL to omit

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

See also: