如果你知道需要删除文件的名字,直接 使用 remove 就好了。
FString CompleteFilePath = "E:/MyProject/SaveFiles/Today/SaveFile1.SAV";
if( ! FPlatformFileManager::Get().GetPlatformFile().DeleteFile(*CompleteFilePath))
{
UE_LOG(...., "Could Not Find File");
return;
}
参考:
https://wiki.unrealengine.com/File_Management,_Create_Folders,_Delete_Files,_and_More#Delete_File