blob: 6ae5cb0220215a07a22dcf74aff1002e3cceae97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "UnityPrefix.h"
#include "Runtime/Utilities/FileUtilities.h"
#include "Runtime/Utilities/GUID.h"
using namespace std;
#if UNITY_HAVE_GUID_INIT
string GetUniqueTempPath (const std::string& basePath)
{
while (true)
{
UnityGUID guid; guid.Init();
string tmpFilePath = basePath + GUIDToString(guid);
if (!IsFileCreated(tmpFilePath))
return tmpFilePath;
}
}
string GetUniqueTempPathInProject ()
{
return GetUniqueTempPath ("Temp/UnityTempFile-");
}
#endif
|