Mount
Mount
#Overview
name: Mount
This variable is created as a Console Variable (cvar).
- type:
Exec
- help:
Sorry: Exec commands have no help
It is referenced in 52
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Mount in the context of Unreal Engine 5 is to integrate various components into the engine’s file system and I/O infrastructure. Here’s a detailed breakdown:
-
The purpose of Mount is primarily for integrating different file systems, I/O backends, and package stores into Unreal Engine’s core systems. It’s used to add new sources of data that the engine can read from.
-
Multiple Unreal Engine subsystems rely on this Mount functionality, including:
- The PakFile system
- IoDispatcher
- PackageStore
- AssetRegistry
- IoStoreOnDemand
-
The value of this variable is typically set when calling the Mount function of various systems, such as FPakPlatformFile::Mount, FIoDispatcher::Mount, or FPackageStore::Mount.
-
Mount often interacts with other variables and systems, such as:
- Encryption keys and GUIDs for secure file access
- File paths and mount points
- Priority/order systems for determining which mounted systems take precedence
-
Developers should be aware that:
- Mounting operations can affect performance and should be managed carefully
- Proper unmounting is important to maintain system integrity
- Mount operations may have different behaviors in shipping builds vs. development builds
-
Best practices when using Mount include:
- Ensuring proper error handling and logging for mount operations
- Managing mount priorities to ensure the correct data sources are used
- Using appropriate mount points to avoid conflicts
- Considering the impact on load times and memory usage when mounting multiple data sources
Mount is a crucial operation in Unreal Engine 5 for integrating various data sources and I/O systems, allowing for flexible and efficient data access across different platforms and configurations.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Media/PixelStreaming/Source/PixelStreamingServers/Private/SignallingServer.cpp:135
Scope (from outer to inner):
file
namespace UE::PixelStreamingServers
function TArray<FWebSocketHttpMount> FSignallingServer::GenerateDirectoriesToServe
Source code excerpt:
if (bResourcesDirExists && FPaths::DirectoryExists(NotFoundDir))
{
FWebSocketHttpMount Mount;
Mount.SetPathOnDisk(NotFoundDir);
Mount.SetWebPath(FString(TEXT("/")));
Mount.SetDefaultFile(FString(TEXT("not_found.html")));
MountsArr.Add(Mount);
return MountsArr;
}
}
#endif // WITH_EDITOR
// Add /Public
#Loc: <Workspace>/Engine/Plugins/Runtime/ChunkDownloader/Source/Private/ChunkDownloader.cpp:1608
Scope (from outer to inner):
file
function void FChunkDownloader::CompleteMountTask
Source code excerpt:
// remove the mount
FMountTask* Mount = Chunk.MountTask;
Chunk.MountTask = nullptr;
// get the work
const FPakMountWork& MountWork = Mount->GetTask();
// update bIsMounted on paks that actually succeeded
for (const TSharedRef<FPakFile>& PakFile : MountWork.MountedPakFiles)
{
PakFile->bIsMounted = true;
}
#Loc: <Workspace>/Engine/Plugins/Runtime/ChunkDownloader/Source/Private/ChunkDownloader.cpp:1651
Scope (from outer to inner):
file
function void FChunkDownloader::CompleteMountTask
Source code excerpt:
// finally delete the task
delete Mount;
// recompute loading stats
ComputeLoadingStats();
}
bool FChunkDownloader::UpdateMountTasks(float dts)
#Loc: <Workspace>/Engine/Plugins/Runtime/MobilePatchingUtils/Source/MobilePatchingUtils/Private/MobilePatchingLibrary.cpp:124
Scope (from outer to inner):
file
function bool UMobileInstalledContent::Mount
Source code excerpt:
}
bool UMobileInstalledContent::Mount(int32 InPakOrder, const FString& InMountPoint)
{
// Mount all pak files found in this content
FPakPlatformFile* PakFileMgr = (FPakPlatformFile*)(FPlatformFileManager::Get().FindPlatformFile(TEXT("PakFile")));
if (PakFileMgr == nullptr)
{
return false;
#Loc: <Workspace>/Engine/Plugins/Runtime/MobilePatchingUtils/Source/MobilePatchingUtils/Private/MobilePatchingLibrary.cpp:145
Scope (from outer to inner):
file
function bool UMobileInstalledContent::Mount
Source code excerpt:
{
FString PakFullName = InstallDir / FileName;
if (PakFileMgr->Mount(*PakFullName, PakOrder, MountPount))
{
UE_LOG(LogMobilePatchingUtils, Log, TEXT("Mounted = %s, Order = %d, MountPoint = %s"), *PakFullName, PakOrder, !MountPount ? TEXT("(null)") : MountPount);
bMounted = true;
}
else
{
#Loc: <Workspace>/Engine/Plugins/Runtime/MobilePatchingUtils/Source/MobilePatchingUtils/Private/MobilePatchingLibrary.h:30
Scope (from outer to inner):
file
class class UMobileInstalledContent : public UObject
Source code excerpt:
*/
UFUNCTION(BlueprintCallable, Category="Mobile Patching", meta=(AdvancedDisplay="PakOrder,MountPoint", PakOrder="1"))
bool Mount(int32 PakOrder, const FString& MountPoint);
public:
// User specified directory where content should be/already installed
FString InstallDir;
// Currently installed manifest
IBuildManifestPtr InstalledManifest;
#Loc: <Workspace>/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataBackends.cpp:777
Scope (from outer to inner):
file
namespace UE::DerivedData
class class FDerivedDataBackendGraph final : public FDerivedDataBackend, ICacheStoreOwner, ICacheStoreGraph
function virtual ILegacyCacheStore* MountPakFile
Source code excerpt:
if (FPlatformFileManager::Get().GetPlatformFile().FileExists(PakFilename))
{
ReadPak = CreatePakFileCacheStore(TEXT("Mount"), PakFilename, /*bWriting*/ false, /*bCompressed*/ false, this);
ReadPakCache.Add(ReadPak);
}
else
{
UE_LOG(LogDerivedDataCache, Warning, TEXT("Failed to add %s read-only pak DDC backend. Make sure it exists and there's at least one hierarchical backend in the cache tree."), PakFilename);
}
#Loc: <Workspace>/Engine/Source/Developer/IoStoreUtilities/Private/IoStoreUtilities.cpp:8328
Scope (from outer to inner):
file
function int32 Staged2Zen
Source code excerpt:
for (const FString& PakFilePath : PakFiles)
{
PakPlatformFile.Mount(*PakFilePath, 0);
TArray<FString> FilesInPak;
PakPlatformFile.GetPrunedFilenamesInPakFile(PakFilePath, FilesInPak);
for (const FString& FileInPak : FilesInPak)
{
FString FileName = FPaths::GetCleanFilename(FileInPak);
if (FileName == TEXT("AssetRegistry.bin"))
#Loc: <Workspace>/Engine/Source/Editor/AddContentDialog/Private/ContentSourceProviders/FeaturePack/FeaturePackContentSource.cpp:186
Scope (from outer to inner):
file
function FFeaturePackContentSource::FFeaturePackContentSource
Source code excerpt:
PakPlatformFile->Initialize(&FPlatformFileManager::Get().GetPlatformFile(), TEXT(""));
}
PakPlatformFile->Mount(*InFeaturePackPath, 0, *MountPoint);
// Gets the manifest file as a JSon string
TArray<uint8> ManifestBuffer;
if (LoadPakFileToBuffer(*PakPlatformFile, FPaths::Combine(*MountPoint, TEXT("manifest.json")), ManifestBuffer) == false)
{
RecordAndLogError(FString::Printf(TEXT("Error in Feature pack %s. Cannot find manifest."), *FeaturePackPath));
#Loc: <Workspace>/Engine/Source/Editor/AddContentDialog/Private/ContentSourceProviders/FeaturePack/FeaturePackContentSource.cpp:422
Scope (from outer to inner):
file
function bool FFeaturePackContentSource::GetAdditionalFilesForPack
Source code excerpt:
FPakPlatformFile PakPlatformFile;
PakPlatformFile.Initialize(&FPlatformFileManager::Get().GetPlatformFile(), TEXT(""));
PakPlatformFile.Mount(*FeaturePackPath, 0, *MountPoint);
// Gets the manifest file as a JSon string
TArray<uint8> ManifestBuffer;
if (LoadPakFileToBuffer(PakPlatformFile, FPaths::Combine(*MountPoint, TEXT("Config/Config.ini")), ManifestBuffer) == false)
{
RecordAndLogError(FString::Printf(TEXT("Error in Feature pack %s. Cannot find Config.ini"), *FeaturePackPath));
#Loc: <Workspace>/Engine/Source/Programs/UnrealTraceServer/src/Store.cpp:520
Scope (from outer to inner):
file
function FStore::~FStore
Source code excerpt:
FStore::~FStore()
{
for (FMount* Mount : Mounts)
{
delete Mount;
}
}
////////////////////////////////////////////////////////////////////////////////
void FStore::Close()
{
for (FMount* Mount : Mounts)
{
Mount->Close();
}
}
////////////////////////////////////////////////////////////////////////////////
bool FStore::AddMount(const FPath& Dir, bool bCreate)
{
FMount* Mount = FMount::Create(this, IoContext, Dir, bCreate);
if (Mount)
{
Mounts.Add(Mount);
}
return Mount != nullptr;
}
////////////////////////////////////////////////////////////////////////////////
bool FStore::RemoveMount(uint32 Id)
{
for (uint32 i = 1, n = Mounts.Num() - 1; i <= n; ++i) // 1 because 0th must always exist
#Loc: <Workspace>/Engine/Source/Programs/UnrealTraceServer/src/Store.cpp:603
Scope (from outer to inner):
file
function FString FStore::GetStoreDir
Source code excerpt:
FString FStore::GetStoreDir() const
{
FMount* Mount = Mounts[0];
return Mount->GetDir();
}
////////////////////////////////////////////////////////////////////////////////
uint32 FStore::GetChangeSerial() const
{
return ChangeSerial;
#Loc: <Workspace>/Engine/Source/Programs/UnrealTraceServer/src/Store.cpp:617
Scope (from outer to inner):
file
function uint32 FStore::GetTraceCount
Source code excerpt:
{
uint32 Count = 0;
for (const FMount* Mount : Mounts)
{
Count += Mount->GetTraceCount();
}
return Count;
}
////////////////////////////////////////////////////////////////////////////////
const FStore::FTrace* FStore::GetTraceInfo(uint32 Index) const
{
for (const FMount* Mount : Mounts)
{
uint32 Count = Mount->GetTraceCount();
if (Index < Count)
{
return Mount->GetTraceInfo(Index);
}
Index -= Count;
}
return nullptr;
}
#Loc: <Workspace>/Engine/Source/Programs/UnrealTraceServer/src/Store.cpp:643
Scope (from outer to inner):
file
function FStore::FTrace* FStore::GetTrace
Source code excerpt:
FStore::FTrace* FStore::GetTrace(uint32 Id, FMount** OutMount) const
{
for (FMount* Mount : Mounts)
{
if (FTrace* Trace = Mount->GetTrace(Id))
{
if (OutMount != nullptr)
{
*OutMount = Mount;
}
return Trace;
}
}
return nullptr;
#Loc: <Workspace>/Engine/Source/Programs/UnrealTraceServer/src/Store.cpp:705
Scope (from outer to inner):
file
function FAsioReadable* FStore::OpenTrace
Source code excerpt:
FAsioReadable* FStore::OpenTrace(uint32 Id)
{
FMount* Mount;
FTrace* Trace = GetTrace(Id, &Mount);
if (Trace == nullptr)
{
return nullptr;
}
return FAsioFile::ReadFile(IoContext, Trace->GetPath());
#Loc: <Workspace>/Engine/Source/Programs/UnrealTraceServer/src/Store.cpp:719
Scope (from outer to inner):
file
function void FStore::OnSettingsChanged
Source code excerpt:
{
// Remove all existing mounts
for (const FMount* Mount : Mounts)
{
delete Mount;
}
Mounts.Empty();
SetupMounts();
Refresh();
}
#Loc: <Workspace>/Engine/Source/Programs/UnrealTraceServer/src/Store.cpp:732
Scope (from outer to inner):
file
function void FStore::Refresh
Source code excerpt:
{
ChangeSerial = 0;
for (FMount* Mount : Mounts)
{
ChangeSerial += Mount->Refresh();
}
}
/* vim: set noexpandtab : */
#Loc: <Workspace>/Engine/Source/Programs/Unsync/Private/UnsyncCmdMount.cpp:10
Scope (from outer to inner):
file
namespace unsync
function int32 CmdMount
Source code excerpt:
FMountedDirectory MountedDir;
bool bOk = MountedDir.Mount(Options.Path);
return bOk ? 0 : 1;
}
} // namespace unsync
#Loc: <Workspace>/Engine/Source/Programs/Unsync/Private/UnsyncMount.cpp:37
Scope (from outer to inner):
file
namespace unsync
function bool FMountedDirectory::Mount
Source code excerpt:
bool
FMountedDirectory::Mount(const FPath& RootPath)
{
FPath DirectoryManifestPath = RootPath / ".unsync" / "manifest.bin";
bValid = false;
DirectoryEntries.clear();
#Loc: <Workspace>/Engine/Source/Programs/Unsync/Private/UnsyncMount.h:51
Scope (from outer to inner):
file
namespace unsync
Source code excerpt:
std::unordered_map<std::wstring_view, uint64> DirectoryMap;
bool Mount(const FPath& RootPath);
};
} // namespace unsync
#Loc: <Workspace>/Engine/Source/Runtime/AssetRegistry/Private/AssetDataGatherer.cpp:2823
Scope (from outer to inner):
file
function void FAssetDataDiscovery::AddMountPointInternal
Source code excerpt:
SetIsIdle(false);
FMountDir& Mount = FindOrAddMountPoint(LocalAbsPath, LongPackageName);
if (ParentMount)
{
FStringView RelPath;
verify(FPathViews::TryMakeChildPathRelativeTo(LocalAbsPath, ParentMount->GetLocalAbsPath(), RelPath));
ParentMount->AddChildMount(&Mount);
Mount.SetParentMount(ParentMount);
for (FMountDir* ChildMount : ChildMounts)
{
ParentMount->RemoveChildMount(ChildMount);
}
}
for (FMountDir* ChildMount : ChildMounts)
{
Mount.AddChildMount(ChildMount);
ChildMount->SetParentMount(&Mount);
}
}
void FAssetDataDiscovery::RemoveMountPoint(const FString& LocalAbsPath)
{
CHECK_IS_NOT_LOCKED_CURRENT_THREAD(ResultsLock);
#Loc: <Workspace>/Engine/Source/Runtime/AssetRegistry/Private/AssetDataGatherer.cpp:2858
Scope (from outer to inner):
file
function void FAssetDataDiscovery::RemoveMountPointInternal
Source code excerpt:
return;
}
TUniquePtr<FMountDir> Mount = MoveTemp(MountDirs[ExistingIndex]);
MountDirs.RemoveAt(ExistingIndex);
FMountDir* ParentMount = Mount->GetParentMount();
if (ParentMount)
{
for (FMountDir* ChildMount : Mount->GetChildMounts())
{
ParentMount->AddChildMount(ChildMount);
ChildMount->SetParentMount(ParentMount);
}
ParentMount->RemoveChildMount(Mount.Get());
}
else
{
for (FMountDir* ChildMount : Mount->GetChildMounts())
{
ChildMount->SetParentMount(nullptr);
}
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Core/Internal/Misc/CoreDelegatesInternal.h:12
Scope: file
Source code excerpt:
enum class EMountOperation
{
Mount,
Unmount
};
/** Delegate to indicate that a pakfile has been mounted/unmounted */
DECLARE_TS_MULTICAST_DELEGATE_ThreeParams(FMountOperationPak, EMountOperation /*Operation*/, const TCHAR* /*PakPath*/, int32 /*Order*/);
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/IO/IoDispatcher.cpp:442
Scope (from outer to inner):
file
function class FIoRequestStats { public: FIoRequestStats
class class FIoRequestStats
class class FIoDispatcherImpl : public FRunnable
function void Mount
Source code excerpt:
}
void Mount(TSharedRef<IIoDispatcherBackend> Backend, int32 Priority)
{
check(IsInGameThread());
if (bIsInitialized)
{
Backend->Initialize(BackendContext);
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/IO/IoDispatcher.cpp:924
Scope (from outer to inner):
file
function class FIoRequestStats { public: FIoRequestStats
class class FIoRequestStats
function void FIoDispatcher::Mount
Source code excerpt:
void
FIoDispatcher::Mount(TSharedRef<IIoDispatcherBackend> Backend, int32 Priority)
{
Impl->Mount(Backend, Priority);
}
FIoBatch
FIoDispatcher::NewBatch()
{
return FIoBatch(*Impl);
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/IO/PackageStore.cpp:150
Scope (from outer to inner):
file
function void FPackageStore::Mount
Source code excerpt:
void FPackageStore::Mount(TSharedRef<IPackageStoreBackend> Backend, int32 Priority)
{
check(IsInGameThread());
int32 Index = Algo::LowerBoundBy(Backends, Priority, &FBackendAndPriority::Key, TGreater<>());
Backends.Insert(MakeTuple(Priority, Backend), Index);
Backend->OnMounted(BackendContext);
}
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/IO/IoDispatcher.h:326
Scope (from outer to inner):
file
class class FIoDispatcher final
Source code excerpt:
CORE_API ~FIoDispatcher();
CORE_API void Mount(TSharedRef<IIoDispatcherBackend> Backend, int32 Priority = 0);
CORE_API FIoBatch NewBatch();
CORE_API TIoStatusOr<FIoMappedRegion> OpenMapped(const FIoChunkId& ChunkId, const FIoReadOptions& Options);
// Polling methods
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/IO/PackageStore.h:189
Scope (from outer to inner):
file
class class FPackageStore
Source code excerpt:
/* Mount a package store backend. */
CORE_API void Mount(TSharedRef<IPackageStoreBackend> Backend, int32 Priority = 0);
/* Returns the package store entry data with export info and imported packages for the specified package ID. */
CORE_API EPackageStoreEntryStatus GetPackageStoreEntry(FPackageId PackageId, FName PackageName,
FPackageStoreEntry& OutPackageStoreEntry);
/* Returns the redirected package ID and source package name for the specified package ID if it's being redirected. */
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/PackageResourceManager.cpp:55
Scope (from outer to inner):
file
function void IPackageResourceManager::Initialize
Source code excerpt:
{
TSharedRef<IIoDispatcherBackend> Backend = UE::MakePackageResourceIoDispatcherBackend(*GPackageResourceManager);
FIoDispatcher::Get().Mount(Backend);
}
}
void IPackageResourceManager::Shutdown()
{
delete GPackageResourceManager;
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/IoStoreOnDemand.cpp:2515
Scope (from outer to inner):
file
namespace UE::IO::IAS
function void FIoStoreOnDemandModule::InitializeInternal
Source code excerpt:
Backend = MakeOnDemandIoDispatcherBackend(MoveTemp(Cache));
Backend->Mount(Endpoint);
int32 BackendPriority = -10;
#if !UE_BUILD_SHIPPING
if (FParse::Param(CommandLine, TEXT("Ias")))
{
// Bump the priority to be higher then the file system backend
BackendPriority = 10;
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/IoStoreOnDemand.cpp:2535
Scope (from outer to inner):
file
namespace UE::IO::IAS
function void FIoStoreOnDemandModule::InitializeInternal
Source code excerpt:
}
FIoDispatcher::Get().Mount(Backend.ToSharedRef(), BackendPriority);
}
void FIoStoreOnDemandModule::StartupModule()
{
#if !UE_IAS_CUSTOM_INITIALIZATION
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/OnDemandIoDispatcherBackend.cpp:1380
Scope (from outer to inner):
file
namespace UE::IO::IAS
class class FOnDemandIoBackend final : public FRunnable , public IOnDemandIoDispatcherBackend
Source code excerpt:
// I/O Http backend
virtual void Mount(const FOnDemandEndpoint& Endpoint) override;
virtual void SetBulkOptionalEnabled(bool bEnabled) override;
virtual void SetEnabled(bool bEnabled) override;
virtual bool IsEnabled() const override;
virtual void AbandonCache() override;
virtual void ReportAnalytics(TArray<FAnalyticsEventAttribute>& OutAnalyticsArray) const override;
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/OnDemandIoDispatcherBackend.cpp:2126
Scope (from outer to inner):
file
namespace UE::IO::IAS
function void FOnDemandIoBackend::Mount
Source code excerpt:
}
void FOnDemandIoBackend::Mount(const FOnDemandEndpoint& Endpoint)
{
LLM_SCOPE_BYTAG(Ias);
TRACE_CPUPROFILER_EVENT_SCOPE(IasBackend::Mount);
if ((Endpoint.DistributionUrl.IsEmpty() && Endpoint.ServiceUrls.IsEmpty()) || Endpoint.TocPath.IsEmpty())
{
UE_LOG(LogIas, Error, TEXT("Trying to mount an invalid on demand endpoint"));
return;
}
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/OnDemandIoDispatcherBackend.cpp:2161
Scope (from outer to inner):
file
namespace UE::IO::IAS
function void FOnDemandIoBackend::Mount
lambda-function
Source code excerpt:
switch (Operation)
{
case EMountOperation::Mount:
this->MountContainer(ContainerPath);
break;
case EMountOperation::Unmount:
this->UnmountContainer(ContainerPath);
break;
default:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/IoStoreOnDemand/Private/OnDemandIoDispatcherBackend.h:55
Scope (from outer to inner):
file
namespace UE::IO::IAS
class class IOnDemandIoDispatcherBackend : public IIoDispatcherBackend
Source code excerpt:
virtual ~IOnDemandIoDispatcherBackend() = default;
virtual void Mount(const FOnDemandEndpoint& Endpoint) = 0;
virtual void SetBulkOptionalEnabled(bool bInEnabled) = 0;
virtual void SetEnabled(bool bInEnabled) = 0;
virtual bool IsEnabled() const = 0;
virtual void AbandonCache() = 0;
virtual void ReportAnalytics(TArray<FAnalyticsEventAttribute>& OutAnalyticsArray) const = 0;
};
#Loc: <Workspace>/Engine/Source/Runtime/Launch/Private/Android/LaunchAndroid.cpp:2269
Scope (from outer to inner):
file
function static bool MountPak
Source code excerpt:
{
const TCHAR* MountPoint = PakMountPoint.GetCharArray().GetData();
return PakFileMgr->Mount(*PakFilePath, PakOrder, MountPoint);
}
return PakFileMgr->Mount(*PakFilePath, PakOrder);
}
JNI_METHOD bool Java_com_epicgames_makeaar_Engine_nativeMountPak(JNIEnv* jenv, jobject thiz, jstring pakFile, jint order, jstring mountPoint)
{
FString PakFilePath = FJavaHelper::FStringFromParam(jenv, pakFile);
uint32 PakOrder = (uint32)FMath::Max(0, order);
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/FilePackageStore.cpp:384
Scope (from outer to inner):
file
function void FFilePackageStoreBackend::Mount
Source code excerpt:
}
void FFilePackageStoreBackend::Mount(FIoContainerHeader* ContainerHeader, uint32 Order)
{
LLM_SCOPE(ELLMTag::AsyncLoading);
FWriteScopeLock _(EntriesLock);
MountedContainers.Add({ ContainerHeader, Order, NextSequence++ });
// Update() relies on stable sorting to efficiently drop unmounted package -> entry ranges, see OldIt
Algo::StableSort(MountedContainers, [](const FMountedContainer& A, const FMountedContainer& B)
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/FilePackageStore.h:90
Scope (from outer to inner):
file
class class FFilePackageStoreBackend : public IPackageStoreBackend
Source code excerpt:
virtual bool GetPackageRedirectInfo(FPackageId PackageId, FName& OutSourcePackageName, FPackageId& OutRedirectedToPackageId) override;
void Mount(FIoContainerHeader* ContainerHeader, uint32 Order);
void Unmount(const FIoContainerHeader* ContainerHeader);
private:
using FMountedDataRange = UE::FilePackageStorePrivate::FMountedDataRange;
using FMountedContainer = UE::FilePackageStorePrivate::FMountedContainer;
using FEntryHandle = UE::FilePackageStorePrivate::FEntryHandle;
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:7958
Scope (from outer to inner):
file
class class FPakExec : private FSelfRegisteringExec
function virtual bool Exec_Dev
Source code excerpt:
virtual bool Exec_Dev(UWorld* InWorld, const TCHAR* Cmd, FOutputDevice& Ar) override
{
if (FParse::Command(&Cmd, TEXT("Mount")))
{
PlatformFile.HandleMountCommand(Cmd, Ar);
return true;
}
else if (FParse::Command(&Cmd, TEXT("Unmount")))
{
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:7994
Scope (from outer to inner):
file
function void FPakPlatformFile::HandleMountCommand
Source code excerpt:
{
const FString MountPoint = FParse::Token(Cmd, false);
Mount(*PakFilename, 0, MountPoint.IsEmpty() ? NULL : *MountPoint);
}
}
void FPakPlatformFile::HandleUnmountCommand(const TCHAR* Cmd, FOutputDevice& Ar)
{
const FString PakFilename = FParse::Token(Cmd, false);
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:8251
Scope (from outer to inner):
file
function bool FPakPlatformFile::Initialize
Source code excerpt:
FIoDispatcher& IoDispatcher = FIoDispatcher::Get();
IoDispatcherFileBackend = CreateIoDispatcherFileBackend();
IoDispatcher.Mount(IoDispatcherFileBackend.ToSharedRef());
PackageStoreBackend = MakeShared<FFilePackageStoreBackend>();
FPackageStore::Get().Mount(PackageStoreBackend.ToSharedRef());
if (bShouldMountGlobal)
{
TIoStatusOr<FIoContainerHeader> IoDispatcherMountStatus = IoDispatcherFileBackend->Mount(*GlobalUTocPath, 0, FGuid(), FAES::FAESKey());
if (IoDispatcherMountStatus.IsOk())
{
UE_LOG(LogPakFile, Display, TEXT("Initialized I/O dispatcher file backend. Mounted the global container: %s"), *GlobalUTocPath);
IoDispatcher.OnSignatureError().AddLambda([](const FIoSignatureError& Error)
{
FPakChunkSignatureCheckFailedData FailedData(Error.ContainerName, TPakChunkHash(), TPakChunkHash(), Error.BlockIndex);
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:8466
Scope (from outer to inner):
file
function bool FPakPlatformFile::Mount
Source code excerpt:
bool FPakPlatformFile::Mount(const TCHAR* InPakFilename, uint32 PakOrder, const TCHAR* InPath /*= nullptr*/, bool bLoadIndex /*= true*/, FPakListEntry* OutPakListEntry /*= nullptr*/)
{
LLM_SCOPE(ELLMTag::FileSystem);
bool bPakSuccess = false;
bool bIoStoreSuccess = true;
if (LowerLevel->FileExists(InPakFilename))
{
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:8568
Scope (from outer to inner):
file
function bool FPakPlatformFile::Mount
Source code excerpt:
ensure(CheckIoStoreContainerBlockSignatures(*UtocPath));
}
TIoStatusOr<FIoContainerHeader> MountResult = IoDispatcherFileBackend->Mount(*UtocPath, PakOrder, EncryptionKeyGuid, EncryptionKey);
if (MountResult.IsOk())
{
UE_LOG(LogPakFile, Display, TEXT("Mounted IoStore container \"%s\""), *UtocPath);
Pak->IoContainerHeader = MakeUnique<FIoContainerHeader>(MountResult.ConsumeValueOrDie());
PackageStoreBackend->Mount(Pak->IoContainerHeader.Get(), PakOrder);
#if WITH_EDITOR
FString OptionalSegmentUtocPath = FPaths::ChangeExtension(InPakFilename, FString::Printf(TEXT("%s.utoc"), FPackagePath::GetOptionalSegmentExtensionModifier()));
if (FPlatformFileManager::Get().GetPlatformFile().FileExists(*OptionalSegmentUtocPath))
{
MountResult = IoDispatcherFileBackend->Mount(*OptionalSegmentUtocPath, PakOrder, EncryptionKeyGuid, EncryptionKey);
if (MountResult.IsOk())
{
Pak->OptionalSegmentIoContainerHeader = MakeUnique<FIoContainerHeader>(MountResult.ConsumeValueOrDie());
PackageStoreBackend->Mount(Pak->OptionalSegmentIoContainerHeader.Get(), PakOrder);
UE_LOG(LogPakFile, Display, TEXT("Mounted optional segment extension IoStore container \"%s\""), *OptionalSegmentUtocPath);
}
else
{
UE_LOG(LogPakFile, Warning, TEXT("Failed to mount optional segment extension IoStore container \"%s\" [%s]"), *OptionalSegmentUtocPath, *MountResult.Status().ToString());
}
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:8607
Scope (from outer to inner):
file
function bool FPakPlatformFile::Mount
Source code excerpt:
if (bPakSuccess && FCoreInternalDelegates::GetOnPakMountOperation().IsBound())
{
FCoreInternalDelegates::GetOnPakMountOperation().Broadcast(EMountOperation::Mount, InPakFilename, PakOrder);
}
if (bPakSuccess)
{
double OnPakFileMounted2Time = 0.0;
{
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:8862
Scope (from outer to inner):
file
function int32 FPakPlatformFile::MountAllPakFiles
Source code excerpt:
SCOPED_BOOT_TIMING("Pak_Mount");
if (Mount(*PakFilename, PakOrder))
{
++NumPakFilesMounted;
}
}
}
return NumPakFilesMounted;
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:8903
Scope (from outer to inner):
file
function IPakFile* FPakPlatformFile::HandleMountPakDelegate
Source code excerpt:
FPakListEntry Pak;
if (Mount(*PakFilePath, PakOrder, nullptr, true, &Pak))
{
return Pak.PakFile;
}
return nullptr;
}
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:8926
Scope (from outer to inner):
file
function void FPakPlatformFile::RegisterEncryptionKey
Source code excerpt:
if (Entry.EncryptionKeyGuid == InGuid)
{
if (Mount(*Entry.Filename, Entry.ReadOrder, Entry.Path.Len() == 0 ? nullptr : *Entry.Path))
{
UE_LOG(LogPakFile, Log, TEXT("Successfully mounted deferred pak file '%s'"), *Entry.Filename);
NumMounted++;
int32 PakchunkIndex = GetPakchunkIndexFromPakFile(Entry.Filename);
if (PakchunkIndex != INDEX_NONE)
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp:9217
Scope (from outer to inner):
file
function void FPakPlatformFile::MakeUniquePakFilesForTheseFiles
Source code excerpt:
// Mount another copy of the existing real PakFile, but don't allow it to Load the index, so it intializes as empty
const bool bLoadIndex = false;
if (Mount(*ExistingRealPakFile->GetFilename(), 500, *ExistingRealPakFile->MountPoint, bLoadIndex))
{
// we successfully mounted the file, find the empty pak file we just added.
for (int j = 0; j < PakFiles.Num(); j++)
{
FPakFile& PotentialNewPakFile = *PakFiles[j].PakFile;
if (PotentialNewPakFile.PakFilename == ExistingRealPakFile->PakFilename && // It has the right name
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IoDispatcherFileBackend.cpp:1281
Scope (from outer to inner):
file
function TIoStatusOr<FIoContainerHeader> FFileIoStore::Mount
Source code excerpt:
}
TIoStatusOr<FIoContainerHeader> FFileIoStore::Mount(const TCHAR* InTocPath, int32 Order, const FGuid& EncryptionKeyGuid, const FAES::FAESKey& EncryptionKey)
{
TUniquePtr<FFileIoStoreReader> Reader(new FFileIoStoreReader(*PlatformImpl, Stats));
FIoStatus IoStatus = Reader->Initialize(InTocPath, Order);
if (!IoStatus.IsOk())
{
return IoStatus;
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Private/IoDispatcherFileBackend.h:107
Scope (from outer to inner):
file
class class FFileIoStore final : public FRunnable , public IIoDispatcherBackend
Source code excerpt:
void Initialize(TSharedRef<const FIoDispatcherBackendContext> Context) override;
void Shutdown() override;
TIoStatusOr<FIoContainerHeader> Mount(const TCHAR* InTocPath, int32 Order, const FGuid& EncryptionKeyGuid, const FAES::FAESKey& EncryptionKey);
bool Unmount(const TCHAR* InTocPath);
bool Resolve(FIoRequestImpl* Request) override;
void CancelIoRequest(FIoRequestImpl* Request) override;
void UpdatePriorityForIoRequest(FIoRequestImpl* Request) override;
bool DoesChunkExist(const FIoChunkId& ChunkId) const override;
TIoStatusOr<uint64> GetSizeForChunk(const FIoChunkId& ChunkId) const;
#Loc: <Workspace>/Engine/Source/Runtime/PakFile/Public/IPlatformFilePak.h:2190
Scope (from outer to inner):
file
class class FPakPlatformFile : public IPlatformFile
Source code excerpt:
* @param InPath Path to mount the pak at.
*/
PAKFILE_API bool Mount(const TCHAR* InPakFilename, uint32 PakOrder, const TCHAR* InPath = nullptr, bool bLoadIndex = true, FPakListEntry* OutPakListEntry = nullptr);
PAKFILE_API bool Unmount(const TCHAR* InPakFilename);
PAKFILE_API int32 MountAllPakFiles(const TArray<FString>& PakFolders);
PAKFILE_API int32 MountAllPakFiles(const TArray<FString>& PakFolders, const FString& WildCard);
#Loc: <Workspace>/Engine/Source/Runtime/StorageServerClient/Private/StorageServerPlatformFile.cpp:420
Scope (from outer to inner):
file
function void FStorageServerPlatformFile::InitializeAfterProjectFilePath
Source code excerpt:
FIoDispatcher& IoDispatcher = FIoDispatcher::Get();
TSharedRef<FStorageServerIoDispatcherBackend> IoDispatcherBackend = MakeShared<FStorageServerIoDispatcherBackend>(*Connection.Get());
IoDispatcher.Mount(IoDispatcherBackend);
#if WITH_COTF
if (CookOnTheFlyServerConnection)
{
FPackageStore::Get().Mount(MakeShared<FCookOnTheFlyPackageStoreBackend>(*CookOnTheFlyServerConnection.Get()));
}
else
#endif
{
FPackageStore::Get().Mount(MakeShared<FStorageServerPackageStoreBackend>(*Connection.Get()));
}
}
else
{
UE_LOG(LogStorageServerPlatformFile, Fatal, TEXT("Failed to get file list from Zen at '%s'"), *Connection->GetHostAddr());
}