| 3435 | } |
| 3436 | |
| 3437 | BFP_EXPORT void BFP_CALLTYPE BfpFile_Delete(const char* path, BfpFileResult* outResult) |
| 3438 | { |
| 3439 | if (!::DeleteFileW(UTF8Decode(path).c_str())) |
| 3440 | { |
| 3441 | int lastError = GetLastError(); |
| 3442 | switch (lastError) |
| 3443 | { |
| 3444 | case ERROR_FILE_NOT_FOUND: |
| 3445 | case ERROR_PATH_NOT_FOUND: |
| 3446 | OUTRESULT(BfpFileResult_NotFound); |
| 3447 | break; |
| 3448 | default: |
| 3449 | OUTRESULT(BfpFileResult_UnknownError); |
| 3450 | break; |
| 3451 | } |
| 3452 | } |
| 3453 | else |
| 3454 | OUTRESULT(BfpFileResult_Ok); |
| 3455 | } |
| 3456 | |
| 3457 | BFP_EXPORT bool BFP_CALLTYPE BfpFile_Exists(const char* path) |
| 3458 | { |
no test coverage detected