| 1168 | } |
| 1169 | |
| 1170 | ccstd::string FileUtils::getFileDir(const ccstd::string &path) const { |
| 1171 | ccstd::string ret; |
| 1172 | size_t pos = path.rfind('/'); |
| 1173 | if (pos != ccstd::string::npos) { |
| 1174 | ret = path.substr(0, pos); |
| 1175 | } |
| 1176 | |
| 1177 | normalizePath(ret); |
| 1178 | |
| 1179 | return ret; |
| 1180 | } |
| 1181 | |
| 1182 | ccstd::string FileUtils::normalizePath(const ccstd::string &path) const { |
| 1183 | ccstd::string ret; |
no test coverage detected