VerifyPersistentStorageCategory

VerifyPersistentStorageCategory

#Overview

name: VerifyPersistentStorageCategory

This variable is created as a Console Variable (cvar).

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of VerifyPersistentStorageCategory is to provide a console command for verifying the state of a specific persistent storage category in Unreal Engine 5. This command is part of the engine’s file system and storage management functionality.

This setting variable is primarily used within the Core module of Unreal Engine, specifically in the HAL (Hardware Abstraction Layer) subsystem. It’s implemented in the IPlatformFileManagedStorageWrapper.cpp file, which suggests it’s related to the managed storage functionality of the engine.

The value of this variable is set as a console command using the FAutoConsoleCommandWithWorldArgsAndOutputDevice class. It’s defined with the command name “VerifyPersistentStorageCategory” and takes a category as an argument.

The main interaction with this variable is through the console command it creates. When invoked, it uses the FPersistentStorageManager to retrieve statistics about the specified category.

Developers should be aware that this command requires a category to be specified as an argument. If no category is provided, it will log an error message.

Best practices when using this variable include:

  1. Always providing a valid category name when invoking the command.
  2. Using it for debugging and verification purposes in development environments.
  3. Being cautious about using it in production builds, as it may have performance implications.

Regarding the associated variable, in this case, there isn’t a separate associated variable. The code snippets provided show the same definition of VerifyPersistentStorageCategory. This is likely an artifact of how the information was collected, and there’s no distinct associated variable to discuss.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/IPlatformFileManagedStorageWrapper.cpp:44

Scope: file

Source code excerpt:

		}
	)
);

static FAutoConsoleCommandWithWorldArgsAndOutputDevice VerifyPersistentStorageCategory(
	TEXT("VerifyPersistentStorageCategory"),
	TEXT("VerifyPersistentStorageCategory <Category>"),
	FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda([](const TArray<FString>& Args, UWorld*, FOutputDevice& Output)
		{
			if (Args.Num() < 1)
			{
				Output.Log(ELogVerbosity::Error, TEXT("A category must be specified"));
				return;
			}

			TOptional<FPersistentStorageCategory::CategoryStat> MaybeStat = FPersistentStorageManager::Get().GetCategoryStat(Args[0]);
			if (!MaybeStat)

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/IPlatformFileManagedStorageWrapper.cpp:43

Scope: file

Source code excerpt:

			);
		}
	)
);

static FAutoConsoleCommandWithWorldArgsAndOutputDevice VerifyPersistentStorageCategory(
	TEXT("VerifyPersistentStorageCategory"),
	TEXT("VerifyPersistentStorageCategory <Category>"),
	FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda([](const TArray<FString>& Args, UWorld*, FOutputDevice& Output)
		{
			if (Args.Num() < 1)
			{
				Output.Log(ELogVerbosity::Error, TEXT("A category must be specified"));
				return;
			}

			TOptional<FPersistentStorageCategory::CategoryStat> MaybeStat = FPersistentStorageManager::Get().GetCategoryStat(Args[0]);

#Associated Variable and Callsites

This variable is associated with another variable named VerifyPersistentStorageCategory. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/IPlatformFileManagedStorageWrapper.cpp:44

Scope: file

Source code excerpt:

		}
	)
);

static FAutoConsoleCommandWithWorldArgsAndOutputDevice VerifyPersistentStorageCategory(
	TEXT("VerifyPersistentStorageCategory"),
	TEXT("VerifyPersistentStorageCategory <Category>"),
	FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda([](const TArray<FString>& Args, UWorld*, FOutputDevice& Output)
		{
			if (Args.Num() < 1)
			{
				Output.Log(ELogVerbosity::Error, TEXT("A category must be specified"));
				return;
			}

			TOptional<FPersistentStorageCategory::CategoryStat> MaybeStat = FPersistentStorageManager::Get().GetCategoryStat(Args[0]);
			if (!MaybeStat)

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/IPlatformFileManagedStorageWrapper.cpp:43

Scope: file

Source code excerpt:

			);
		}
	)
);

static FAutoConsoleCommandWithWorldArgsAndOutputDevice VerifyPersistentStorageCategory(
	TEXT("VerifyPersistentStorageCategory"),
	TEXT("VerifyPersistentStorageCategory <Category>"),
	FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda([](const TArray<FString>& Args, UWorld*, FOutputDevice& Output)
		{
			if (Args.Num() < 1)
			{
				Output.Log(ELogVerbosity::Error, TEXT("A category must be specified"));
				return;
			}

			TOptional<FPersistentStorageCategory::CategoryStat> MaybeStat = FPersistentStorageManager::Get().GetCategoryStat(Args[0]);