Create new string functions for detecting, whether a path is (or could be) a file or a directory. The signatures are as follows:
is_dir(sPath) -> LOG
is_file(sPath) -> LOG
Distinguishing between files and folders is not a simple task. First thing is to ensure that the string actually follows path syntax conventions. Remember that NumeRe accepts Windows and UNIX path separators. If that is successful, one can check, if the file exists using the fileExists() function. In this case, it is a file. Otherwise, it is either not a file or it does not exist. These two cases might be separated by checking for a file extension within the last part of the string. It might also be reasonable to use another approach using wxWidgets functionalities like the wxFileName class. (see https://docs.wxwidgets.org/3.0/classwx_file_name.html)
Both functions are part of the automatic SW tests. All deviations were resolved.
Anonymous
Diff:
Diff:
Diff:
Diff:
Related
Commit: [r1159]
Diff:
Diff:
Related
Commit: [r1159]
Diff:
Related
Commit: [r1159]
Diff: