| 286 | |
| 287 | #if (CC_PLATFORM == CC_PLATFORM_ANDROID || CC_PLATFORM == CC_PLATFORM_OHOS || CC_PLATFORM == CC_PLATFORM_OPENHARMONY) |
| 288 | static ccstd::string getFileNameForPath(const ccstd::string &filePath) { |
| 289 | ccstd::string fileName = filePath; |
| 290 | const size_t lastSlashIdx = fileName.find_last_of("\\/"); |
| 291 | if (ccstd::string::npos != lastSlashIdx) { |
| 292 | fileName.erase(0, lastSlashIdx + 1); |
| 293 | } |
| 294 | return fileName; |
| 295 | } |
| 296 | #endif |
| 297 | |
| 298 | static struct lws_protocols defaultProtocols[2]; |