| 538 | } |
| 539 | |
| 540 | bool FileSystem::IsAbsolute(const char* path) { |
| 541 | if (path[0] == '/') |
| 542 | return true; // because _stat("/file") for windows or linux search on the current disk file as a absolute path |
| 543 | #if defined(_WIN32) |
| 544 | return isalpha(path[0]) && path[1]==':' && (path[2]=='/' || path[2]=='\\'); // "C:" is a file (relative path) |
| 545 | #else |
| 546 | return false; |
| 547 | #endif |
| 548 | } |
| 549 | |
| 550 | string& FileSystem::MakeRelative(string& path) { |
| 551 | UInt32 count(0); |