PathToRAC
PathToRAC
#Overview
name: PathToRAC
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 2
C++ source files.
#Summary
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:2431, section: [RuntimeAssetCache]
- INI Section:
RuntimeAssetCache
- Raw value:
RuntimeAssetCache
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RuntimeAssetCache/Private/RuntimeAssetCacheFilesystemBackend.cpp:10
Scope (from outer to inner):
file
function FArchive* FRuntimeAssetCacheFilesystemBackend::CreateReadArchive
Source code excerpt:
FArchive* FRuntimeAssetCacheFilesystemBackend::CreateReadArchive(FName Bucket, const TCHAR* CacheKey)
{
FString Path = FPaths::Combine(*PathToRAC, *Bucket.ToString(), CacheKey);
return IFileManager::Get().CreateFileReader(*Path);
}
FArchive* FRuntimeAssetCacheFilesystemBackend::CreateWriteArchive(FName Bucket, const TCHAR* CacheKey)
{
FString Path = FPaths::Combine(*PathToRAC, *Bucket.ToString(), CacheKey);
return IFileManager::Get().CreateFileWriter(*Path);
}
FRuntimeAssetCacheFilesystemBackend::FRuntimeAssetCacheFilesystemBackend()
{
GConfig->GetString(TEXT("RuntimeAssetCache"), TEXT("PathToRAC"), PathToRAC, GEngineIni);
PathToRAC = FPaths::ProjectSavedDir() / PathToRAC;
}
bool FRuntimeAssetCacheFilesystemBackend::RemoveCacheEntry(const FName Bucket, const TCHAR* CacheKey)
{
FString Path = FPaths::Combine(*PathToRAC, *Bucket.ToString(), CacheKey);
return IFileManager::Get().Delete(*Path);
}
bool FRuntimeAssetCacheFilesystemBackend::ClearCache()
{
return IFileManager::Get().DeleteDirectory(*PathToRAC, false, true);
}
bool FRuntimeAssetCacheFilesystemBackend::ClearCache(FName Bucket)
{
if (Bucket != NAME_None)
{
return IFileManager::Get().DeleteDirectory(*FPaths::Combine(*PathToRAC, *Bucket.ToString()), false, true);
}
return false;
}
FRuntimeAssetCacheBucket* FRuntimeAssetCacheFilesystemBackend::PreLoadBucket(FName BucketName, int32 BucketSize)
{
FString Path = FPaths::Combine(*PathToRAC, *BucketName.ToString());
FRuntimeAssetCacheBucket* Result = new FRuntimeAssetCacheBucket(BucketSize);
class FRuntimeAssetCacheFilesystemBackendDirectoryVisitor : public IPlatformFile::FDirectoryVisitor
{
public:
FRuntimeAssetCacheFilesystemBackendDirectoryVisitor(FRuntimeAssetCacheBucket* InBucket, FName InBucketName, FRuntimeAssetCacheFilesystemBackend* InBackend)
#Loc: <Workspace>/Engine/Source/Runtime/RuntimeAssetCache/Private/RuntimeAssetCacheFilesystemBackend.h:31
Scope (from outer to inner):
file
class class FRuntimeAssetCacheFilesystemBackend : public FRuntimeAssetCacheBackend
Source code excerpt:
/** File system path to runtime asset cache. */
FString PathToRAC;
};