|
||
The above three classes are provided for parsing filenames. All provide the same parsing capability (except that the path
passed to TParsePtrC
cannot be modified, for example by adding or removing a directory), but they differ in several respects. TParse
uses a 256 byte TFileName
as an internal buffer to store a copy of the fully parsed filename. The other two classes on the other hand do not have any
storage space. They should be used in preference to TParse
when minimizing stack usage is a priority.
When using TParsePtr
and TParsePtrC
in preference to TParse
, remember that:
unlike TParse
, these classes do not provide an option to disallow the use of wildcards in the filename and extension
because the path to be parsed is passed as an argument to the constructor for a TParsePtr
or TParsePtrC
, if this path is invalid, construction will fail and a panic will occur. TParse
, on the other hand, returns an error if the specified path is invalid
only instances of class TParse
can be passed to calls to RFs::Parse()
TParsePtrC
cannot modify the path which is passed to it, for example by adding or removing a directory