| 422 | } |
| 423 | |
| 424 | SC::Result SC::FileSystem::formatError(int errorNumber, StringSpan item, bool isWindowsNativeError) |
| 425 | { |
| 426 | #if SC_PLATFORM_WINDOWS |
| 427 | if (isWindowsNativeError) |
| 428 | { |
| 429 | if (not preciseErrorMessages) |
| 430 | { |
| 431 | return Result::Error("Windows Error"); |
| 432 | } |
| 433 | if (not Internal::formatWindowsError(errorNumber, errorMessageBuffer)) |
| 434 | { |
| 435 | return Result::Error("SC::FileSystem::formatError - Cannot format error"); |
| 436 | } |
| 437 | } |
| 438 | else |
| 439 | #endif |
| 440 | { |
| 441 | (void)(isWindowsNativeError); |
| 442 | if (not preciseErrorMessages) |
| 443 | { |
| 444 | return getErrorCode(errorNumber); |
| 445 | } |
| 446 | if (not Internal::formatError(errorNumber, errorMessageBuffer)) |
| 447 | { |
| 448 | return Result::Error("SC::FileSystem::formatError - Cannot format error"); |
| 449 | } |
| 450 | } |
| 451 | (void)item; // TODO: Append item name |
| 452 | return Result::FromStableCharPointer(errorMessageBuffer); |
| 453 | } |
| 454 | |
| 455 | SC::Result SC::FileSystem::rename(StringSpan path, StringSpan newPath) |
| 456 | { |
nothing calls this directly
no test coverage detected