| class TParseBase |
Base class for file name parsing.
You first need to set up the path to be parsed using either a TParse, TParsePtr or TParsePtrC object.
The interrogation and extraction functions in this class allow you to test whether a component has been specified in the pathname, and if so, to extract it. If a component is not present in the pathname, the extraction function returns an empty string.
This class also allows directories to be added to, and popped from the path.
Notes:
1. the filename modification functions cannot be used by the TParsePtrC class.
2. navigation using .. and . is not supported.
| Public Member Functions | |
|---|---|
| TParseBase() | |
| IMPORT_C TInt | AddDir(const TDesC &) |
| IMPORT_C TPtrC | Drive() |
| IMPORT_C TPtrC | DriveAndPath() |
| IMPORT_C TBool | DrivePresent() |
| IMPORT_C TPtrC | Ext() |
| IMPORT_C TBool | ExtPresent() |
| IMPORT_C const TDesC & | FullName() |
| IMPORT_C TBool | IsExtWild() |
| IMPORT_C TBool | IsKMatchAny() |
| IMPORT_C TBool | IsKMatchOne() |
| IMPORT_C TBool | IsNameWild() |
| IMPORT_C TBool | IsRoot() |
| IMPORT_C TBool | IsWild() |
| IMPORT_C TPtrC | Name() |
| IMPORT_C TPtrC | NameAndExt() |
| IMPORT_C TBool | NameOrExtPresent() |
| IMPORT_C TBool | NamePresent() |
| IMPORT_C TPtrC | Path() |
| IMPORT_C TBool | PathPresent() |
| IMPORT_C TInt | PopDir() |
| Protected Member Functions | |
|---|---|
| TDes & | NameBuf() |
| const TDesC & | NameBufC() |
| TInt | Set(const TDesC *, const TDesC *, const TDesC *, TBool) |
| Private Member Functions | |
|---|---|
| TInt | ParseDrive(TLex &, TBool &) |
| TInt | ParseExt(TLex &, TBool &) |
| TInt | ParseName(TLex &, TBool &) |
| TInt | ParsePath(TLex &, TBool &) |
| Private Member Enumerations | |
|---|---|
| enum | TField { EDrive, EPath, EName, EExt, EMaxFields } |
| enum | TWild { EWildName = 0x01, EWildExt = 0x02, EWildEither = 0x04, EIsRoot = 0x08, EWildIsKMatchOne = 0x10, EWildIsKMatchAny = 0x20 } |
| Protected Attributes | |
|---|---|
| TInt16 | iMod |
| Private Attributes | |
|---|---|
| SField | iField |
| TInt16 | iWild |
| TInt | Set | ( | const TDesC * | aName, |
| const TDesC * | aRelated, | |||
| const TDesC * | aDefault, | |||
| TBool | allowWild | |||
| ) | [protected] | |||
| EWildName = 0x01 | |
| EWildExt = 0x02 | |
| EWildEither = 0x04 | |
| EIsRoot = 0x08 | |
| EWildIsKMatchOne = 0x10 | |
| EWildIsKMatchAny = 0x20 |