| 296 | } |
| 297 | |
| 298 | size_t LibrarySystem::GetFileFromPath(char *buffer, size_t maxlength, const char *path) |
| 299 | { |
| 300 | size_t length = strlen(path); |
| 301 | |
| 302 | for (size_t i = length - 1; |
| 303 | i <= length - 1; |
| 304 | i--) |
| 305 | { |
| 306 | if (path[i] == '/' |
| 307 | #if defined PLATFORM_WINDOWS |
| 308 | || path[i] == '\\' |
| 309 | #endif |
| 310 | ) |
| 311 | { |
| 312 | return ke::SafeStrcpy(buffer, maxlength, &path[i+1]); |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | /* We scanned and found no path separator */ |
| 317 | return ke::SafeStrcpy(buffer, maxlength, path); |
| 318 | } |
| 319 | |
| 320 | bool LibrarySystem::FileTime(const char *path, FileTimeType type, time_t *pTime) |
| 321 | { |
no outgoing calls
no test coverage detected