MCPcopy Create free account
hub / github.com/beefytech/Beef / BfpDirectory_Create

Function BfpDirectory_Create

BeefySysLib/platform/win/Platform.cpp:2740–2763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2738
2739struct BfpFindFileData;
2740BFP_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
2765BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Rename(const char* oldName, const char* newName, BfpFileResult* outResult)
2766{

Callers 2

ExecuteMethod · 0.50

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected