1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
10 #include <ModelAPI_Feature.h>
16 \brief Return directory part of the file path.
18 If the file path does not include directory part (the file is in the
19 current directory), null string is returned.
22 \param abs if true (default) \a path parameter is treated as absolute file path
23 \return directory part of the file path
25 namespace XGUI_Tools {
28 * Returns directory name from name of file
29 * \param path a path to a file
30 * \param isAbs is absolute or relative path
32 QString XGUI_EXPORT dir(const QString& path, bool isAbs = true);
35 \brief Return file name part of the file path.
38 \param withExt if true (default) complete file name (with all
39 extension except the last) is returned, otherwise only base name
41 \return file name part of the file path
43 QString XGUI_EXPORT file(const QString& path, bool withExt = true);
46 \brief Add a slash (platform-specific) to the end of \a path
47 if it is not already there.
48 \param path directory path
49 \return modified path (with slash added to the end)
51 QString XGUI_EXPORT addSlash(const QString& path);
53 /// The model concerning tools
56 Returns true if the feature is a model object
57 \param theFeature a feature
59 bool XGUI_EXPORT isModelObject(FeaturePtr theFeature);
62 Returns the string presentation of the given feature
63 \param theFeature a feature
65 std::string XGUI_EXPORT featureInfo(FeaturePtr theFeature);