| 261 | } |
| 262 | |
| 263 | const char *LibrarySystem::GetFileExtension(const char *filename) |
| 264 | { |
| 265 | size_t len, end; |
| 266 | |
| 267 | len = strlen(filename); |
| 268 | |
| 269 | /* Minimum string length for filename with ext would be 3; example: a.a */ |
| 270 | if (len < 3) |
| 271 | { |
| 272 | return NULL; |
| 273 | } |
| 274 | |
| 275 | end = len - 1; |
| 276 | |
| 277 | for (size_t i = end; i <= end; i--) |
| 278 | { |
| 279 | if (filename[i] == PLATFORM_SEP_CHAR || filename[i] == PLATFORM_SEP_ALTCHAR) |
| 280 | { |
| 281 | break; |
| 282 | } |
| 283 | |
| 284 | if (filename[i] == '.' && i != end && i != 0) |
| 285 | { |
| 286 | return &filename[++i]; |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | return NULL; |
| 291 | } |
| 292 | |
| 293 | bool LibrarySystem::CreateFolder(const char *path) |
| 294 | { |
no outgoing calls
no test coverage detected