|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Base class for file name parsing. More...
#include <f32file.h>
Public Member Functions | |
| IMPORT_C | TParseBase () |
| Default constructor. | |
| IMPORT_C TInt | PopDir () |
| Removes the last directory from the path in the fully parsed specification. | |
| IMPORT_C TInt | AddDir (const TDesC &aName) |
| Adds a single directory onto the end of the path in the fully parsed specification. | |
| IMPORT_C const TDesC & | FullName () const |
| Gets the complete file specification. | |
| IMPORT_C TPtrC | Drive () const |
| Gets the drive letter. | |
| IMPORT_C TPtrC | Path () const |
| Gets the path. | |
| IMPORT_C TPtrC | DriveAndPath () const |
| Gets the drive letter and path. | |
| IMPORT_C TPtrC | Name () const |
| Gets the filename. | |
| IMPORT_C TPtrC | Ext () const |
| Gets the extension. | |
| IMPORT_C TPtrC | NameAndExt () const |
| Gets the filename and extension. | |
| IMPORT_C TBool | DrivePresent () const |
| Tests whether a drive is present. | |
| IMPORT_C TBool | PathPresent () const |
| Tests whether a path is present. | |
| IMPORT_C TBool | NamePresent () const |
| Tests whether a file name is present. | |
| IMPORT_C TBool | ExtPresent () const |
| Tests whether an extension is present. | |
| IMPORT_C TBool | NameOrExtPresent () const |
| Tests whether a filename or an extension are present. | |
| IMPORT_C TBool | IsRoot () const |
| Tests whether the path in the fully parsed specification is the root directory. | |
| IMPORT_C TBool | IsWild () const |
| Tests whether the filename or the extension in the fully parsed specification contains one or more wildcard characters. | |
| IMPORT_C TBool | IsKMatchOne () const |
| Tests whether the name or the extension contains a question mark wildcard. | |
| IMPORT_C TBool | IsKMatchAny () const |
| Tests whether the name or the extension contains asterisk wildcards. | |
| IMPORT_C TBool | IsNameWild () const |
| Tests whether the filename in the fully parsed specification contains one or more wildcard characters. | |
| IMPORT_C TBool | IsExtWild () const |
| Tests whether the extension in the fully parsed specification contains one or more wildcard characters. | |
Protected Member Functions | |
| virtual TDes & | NameBuf ()=0 |
| virtual const TDesC & | NameBufC () const =0 |
| TInt | Set (const TDesC *aName, const TDesC *aRelated, const TDesC *aDefault, TBool allowWild) |
Protected Attributes | |
| TInt16 | iMod |
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:
| IMPORT_C TParseBase::TParseBase | ( | ) |
Default constructor.
(generated from Symbian Developer Library)
| IMPORT_C TInt TParseBase::AddDir | ( | const TDesC & | aName | ) |
Adds a single directory onto the end of the path in the fully parsed specification.
The directory is inserted between the final directory, and the filename, if there is one.
KMaxFileName
| aName | The directory to be added. It must not start with a \ otherwise the function does not recognise it as a valid directory name and an error is returned. The directory name must not end with a \ since the function adds this automatically. It must not exceed the maximum filename length, KMaxFileName characters, otherwise an error is returned. |
(generated from Symbian Developer Library)
| IMPORT_C TPtrC TParseBase::Drive | ( | ) | const |
Gets the drive letter.
The drive letter is in the form:
drive-letter:
Note that the drive letter is folded.
(generated from Symbian Developer Library)
| IMPORT_C TPtrC TParseBase::DriveAndPath | ( | ) | const |
Gets the drive letter and path.
This is in the form
drive-letter:\path\
Note that the drive letter is folded
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::DrivePresent | ( | ) | const |
Tests whether a drive is present.
Note that this function refers to a component in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() or RFs::Parse(), not to the resulting fully parsed file specification.
(generated from Symbian Developer Library)
| IMPORT_C TPtrC TParseBase::Ext | ( | ) | const |
| IMPORT_C TBool TParseBase::ExtPresent | ( | ) | const |
Tests whether an extension is present.
Note that this function refers to a component in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() or RFs::Parse(), not to the resulting fully parsed file specification.
This function returns true even if the extension contains only wildcards. It only returns false if nothing is specified.
(generated from Symbian Developer Library)
| IMPORT_C const TDesC & TParseBase::FullName | ( | ) | const |
Gets the complete file specification.
This is in the form:
drive-letter: \path\filename.extension
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::IsExtWild | ( | ) | const |
Tests whether the extension in the fully parsed specification contains one or more wildcard characters.
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::IsKMatchAny | ( | ) | const |
Tests whether the name or the extension contains asterisk wildcards.
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::IsKMatchOne | ( | ) | const |
Tests whether the name or the extension contains a question mark wildcard.
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::IsNameWild | ( | ) | const |
Tests whether the filename in the fully parsed specification contains one or more wildcard characters.
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::IsRoot | ( | ) | const |
Tests whether the path in the fully parsed specification is the root directory.
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::IsWild | ( | ) | const |
Tests whether the filename or the extension in the fully parsed specification contains one or more wildcard characters.
(generated from Symbian Developer Library)
| IMPORT_C TPtrC TParseBase::Name | ( | ) | const |
| IMPORT_C TPtrC TParseBase::NameAndExt | ( | ) | const |
Gets the filename and extension.
This is in the form:
filename.ext
(generated from Symbian Developer Library)
|
protectedpure virtual |
Implemented in TParsePtr, TParsePtrC, and TParse.
|
protectedpure virtual |
Implemented in TParsePtr, TParsePtrC, and TParse.
| IMPORT_C TBool TParseBase::NameOrExtPresent | ( | ) | const |
Tests whether a filename or an extension are present.
Note that this function refers to a component in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() or RFs::Parse(), not to the resulting fully parsed file specification.
This function returns true even if the filename or extension specified in aName contain only wildcards. It only returns false if nothing is specified.
(generated from Symbian Developer Library)
| IMPORT_C TBool TParseBase::NamePresent | ( | ) | const |
Tests whether a file name is present.
Note that this function refers to a component in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() or RFs::Parse(), not to the resulting fully parsed file specification.
This function returns true even if the filename specified in aName contains only wildcards. It only returns false if nothing is specified.
(generated from Symbian Developer Library)
| IMPORT_C TPtrC TParseBase::Path | ( | ) | const |
| IMPORT_C TBool TParseBase::PathPresent | ( | ) | const |
Tests whether a path is present.
Note that this function refers to a component in the aName argument specified in calls to TParse::Set(), TParse::SetNoWild() or RFs::Parse(), not to the resulting fully parsed file specification.
(generated from Symbian Developer Library)
| IMPORT_C TInt TParseBase::PopDir | ( | ) |
Removes the last directory from the path in the fully parsed specification.
This function may be used to navigate up one level in a directory hierarchy. An error is returned if the specified directory is the root.
(generated from Symbian Developer Library)
|
protected |