Create a fileparts function
Framework for numerical computations, data analysis and visualisation
Brought to you by:
numere
Create a fileparts function like the one in MATLAB:
{drive, path, filename, ext} = fileparts(filepath)
There are two things to do:
fileparts() function, e.g. with the signature vector<string> getFileParts(const string&) either as part of the tools component or as member of the FileSystem class (latter one is preferred). The function should separate the passed file path into the drive letter, the path, the file name and the extension, e.g. "C:\Software\NumeRe\numere.exe" -> "C", "Software\NumeRe", "numere", "exe".stringparsing.cpp, e.g. as static string strfnc_fileparts(StringFuncArgs& funcArgs) with the signature STR. One can let inspire himself by getfilelist(). Additionally, the new function has to be registered in static map<string, StringFuncHandle> parser_getStringFuncHandles() and the corresponding language strings have to be created.FileSystem class was more than expected by the analysis. Multiple changes were carried out and the class is now able to distinguish between file and folder pathsFileSystem were commented sufficiently.This functionality was added to the automatic SW tests. No deviations detected.
Anonymous
Diff:
Diff:
Diff:
Diff:
Related
Commit: [r417]
Diff: