MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / EnsureAccess

Method EnsureAccess

Source/Engine/Content/Storage/ContentStorageManager.cpp:116–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116FlaxStorageReference ContentStorageManager::EnsureAccess(const StringView& path)
117{
118 // Note: because we want to create new storage package it may exists.
119 // So let's check if any storage container is referencing that location and try to close it.
120 auto storage = TryGetStorage(path);
121 if (storage && storage->IsLoaded())
122 {
123 LOG(Info, "File \'{0}\' is in use. Trying to release handle to it.", path);
124 storage->CloseFileHandles();
125 }
126 return storage;
127}
128
129uint32 ContentStorageManager::GetMemoryUsage()
130{

Callers

nothing calls this directly

Calls 2

CloseFileHandlesMethod · 0.80
IsLoadedMethod · 0.45

Tested by

no test coverage detected