Class ContentStorageManager
Content Storage Manager is responsible for content data management
Inheritance
Assembly: FlaxEngine.dll
File: Engine/Content/Storage/ContentStorageManager.h
Syntax
public class ContentStorageManager
Fields
UnusedDataChunksLifetime
Auto-release timeout for unused asset chunks.
Declaration
public static TimeSpan UnusedDataChunksLifetime
Field Value
TimeSpan
|
Methods
EnsureAccess(const StringView& path)
Ensures the access to the given file location is free. Closes handles to that file from packages.
Declaration
public static FlaxStorageReference EnsureAccess(const StringView& path)
Parameters
StringView
path
The path. |
Returns
FlaxStorageReference
Flax Storage or null in no package at that location has been opened. |
EnsureUnlocked()
Ensures that storage manager is unlocked (by stopping the thread if its locked).
Declaration
public static void EnsureUnlocked()
FormatPath(String& path)
GetAssetEntry(const String& path, FlaxStorage::Entry& output)
Gets the asset entry in the storage at the given path (if it has one stored item).
Declaration
public static bool GetAssetEntry(const String& path, FlaxStorage::Entry& output)
Parameters
String
path
The path. |
FlaxStorage::Entry
output
The output. |
Returns
bool
True if cannot load storage container or it has more than one entry inside. |
GetFiles(Array<FlaxFile* >& result)
Gets the files.
Declaration
public static void GetFiles(Array<FlaxFile* >& result)
Parameters
Array<FlaxFile >
result
The result. |
GetMemoryUsage()
Gets total memory used by chunks (in bytes).
Declaration
public static uint32 GetMemoryUsage()
Returns
uint32
Memory usage in bytes. |
GetPackages(Array<FlaxPackage* >& result)
Gets the packages.
Declaration
public static void GetPackages(Array<FlaxPackage* >& result)
Parameters
Array<FlaxPackage >
result
The result. |
GetStorage(Array<FlaxStorage* >& result)
Gets the storage containers (packages and files).
Declaration
public static void GetStorage(Array<FlaxStorage* >& result)
Parameters
Array<FlaxStorage >
result
The result. |
GetStorage(const StringView& path, bool loadIt=true)
Gets the assets data storage container.
Declaration
public static FlaxStorageReference GetStorage(const StringView& path, bool loadIt=true)
Parameters
StringView
path
The path. |
bool
loadIt
True if load container, otherwise false. |
Returns
FlaxStorageReference
Flax Storage or null if not package at that location |
HasAsset(const Guid& id)
Determines whether the specified asset exists in this container.
Declaration
public static bool HasAsset(const Guid& id)
Parameters
Guid
id
The asset identifier. |
Returns
bool
True if the specified asset exists in this container, otherwise false. |
IsFlaxStorageExtension(const String& extension)
Determines whether the specified extension can be a binary asset file.
Declaration
public static bool IsFlaxStorageExtension(const String& extension)
Parameters
String
extension
The path. |
Returns
bool
True if can be a storage extension, otherwise false. |
IsFlaxStoragePath(const String& path)
Determines whether the specified path can be a binary asset file (based on it's extension).
Declaration
public static bool IsFlaxStoragePath(const String& path)
Parameters
String
path
The path. |
Returns
bool
True if can be a storage path (has a proper extension), otherwise false. |
OnRenamed(const StringView& oldPath, const StringView& newPath)
Called when asset ges renamed.
Declaration
public static void OnRenamed(const StringView& oldPath, const StringView& newPath)
Parameters
StringView
oldPath
The old path. |
StringView
newPath
The new path. |
TryGetStorage(const StringView& path)
Tries the assets data storage container if it's created.
Declaration
public static FlaxStorageReference TryGetStorage(const StringView& path)
Parameters
StringView
path
The path. |
Returns
FlaxStorageReference
Flax Storage or null in no package at that location has been opened. |