| 2738 | |
| 2739 | struct BfpFindFileData; |
| 2740 | BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Create(const char* path, BfpFileResult* outResult) |
| 2741 | { |
| 2742 | UTF16String wPath = UTF8Decode(path); |
| 2743 | if (!::CreateDirectoryW(wPath.c_str(), NULL)) |
| 2744 | { |
| 2745 | int lastError = ::GetLastError(); |
| 2746 | switch (lastError) |
| 2747 | { |
| 2748 | case ERROR_ALREADY_EXISTS: |
| 2749 | OUTRESULT(BfpFileResult_AlreadyExists); |
| 2750 | break; |
| 2751 | case ERROR_PATH_NOT_FOUND: |
| 2752 | OUTRESULT(BfpFileResult_NotFound); |
| 2753 | break; |
| 2754 | default: |
| 2755 | OUTRESULT(BfpFileResult_UnknownError); |
| 2756 | break; |
| 2757 | } |
| 2758 | } |
| 2759 | else |
| 2760 | { |
| 2761 | OUTRESULT(BfpFileResult_Ok); |
| 2762 | } |
| 2763 | } |
| 2764 | |
| 2765 | BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Rename(const char* oldName, const char* newName, BfpFileResult* outResult) |
| 2766 | { |
no test coverage detected