Hi,
I know its easy to make a funtion to do those functionalitiesbut i think its nice we have a built in parser to do those functionalities.
Thanks
Hi,
I know its easy to make a funtion to do those functionalitiesbut i think its nice we have a built in parser to do those functionalities.
Thanks
Good idea, indeed. I've shared this with the dev team. Feel free to expand on this, for use as input to the formulation of a corresponding sprint story.
best
Alex
Great!
This is the class that i want:
CFileParser::CFileParser() {
public:
// const String &name - The file specification to be parsed.
CFileParser(const String &name);
~CFilePArser();
private:
enum TField {EDrive, EPath, EName, EExt, EMaxFields};
public:
void addDir(String dirName);
String FullName();
char drive();
String path();
String driveAndPath();
String name();
String ext();
String nameAndExt();
bool drivePresent();
bool PathPresent();
void popDir();
private:
String name;
}
Description:
void addDir(String dirName) - Adds a single directory onto the end of the path in the fully parsed specification.
String FullName() - Gets the complete file specification(Drive letter:/path/filename.extension).
char drive() - Gets the drive letter.
String path()- Gets the drive path.
String driveAndPath() - Gets the drive and path.
String name() - Gets the filename.
String ext() - Gets the extension
String nameAndExt() - Gets the name and extension
bool drivePresent() - Tests whether a drive is present.
bool PathPresent() - Tests whether a path is present.
void popDir() - Removes the last directory from the path in the fully parsed specification.