MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / CreatePath

Function CreatePath

engine/Poseidon/UI/OptionsUI.cpp:205–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203{
204 return FindLocalizedMissionHtmlFile(GetMissionDirectory(), "briefing");
205}
206
207void CreatePath(RString path)
208{
209 const std::filesystem::path directory = FilesystemPathFromUtf8(path.Data()).parent_path();
210 if (!directory.empty())
211 CreateDirectoryUtf8(FilesystemPathToUtf8(directory).c_str());
212}
213
214static RString GetLegacyUserSaveDirectory()
215{
216 return GetUserDirectory() + RString("Saved/") + GetBaseDirectory() + GetBaseSubdirectory() +
217 RString(Glob.header.filenameReal) + RString(".") + RString(Glob.header.worldname) + RString("/");
218}
219
220static void CopyLegacyUserSaveFiles(RString destination)
221{
222 const RString source = GetLegacyUserSaveDirectory();
223 static const char* filenames[] = {"autosave.fps", "continue.fps", "save.fps", "weapons.cfg"};
224 for (const char* filename : filenames)

Callers 11

CreateOperativePathMethod · 0.85
DoProcessXMLMethod · 0.85
ReceiveFileSegmentMethod · 0.85
TransferFaceMethod · 0.85
TransferCustomRadioMethod · 0.85
OnMessageMethod · 0.85
SaveFileFunction · 0.85
CreateMissionMethod · 0.85
GetSaveDirectoryFunction · 0.85
GetTmpSaveDirectoryFunction · 0.85
ConfigSaveFunction · 0.85

Calls 1

DataMethod · 0.45

Tested by

no test coverage detected