You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485 [CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
54 lines
1.8 KiB
C++
54 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/StringFwd.h"
|
|
#include "Containers/UnrealString.h"
|
|
|
|
namespace UE::Virtualization
|
|
{
|
|
class FPayloadId;
|
|
} // namespace UE::Virtualization
|
|
|
|
namespace UE::Virtualization::Utils
|
|
{
|
|
|
|
/**
|
|
* Converts a FPayloadId into a file path.
|
|
*
|
|
* This utility will take a FPayloadId and return a file path that is
|
|
* 3 directories deep. The first six characters of the id will be used to
|
|
* create the directory names, with each directory using two characters.
|
|
* The remaining thirty four characters will be used as the file name.
|
|
* Lastly the extension '.payload' will be applied to complete the path/
|
|
* Example: FPayloadId 0139d6d5d477e32dfd2abd3c5bc8ea8507e8eef8 becomes
|
|
* 01/39/d6/d5d477e32dfd2abd3c5bc8ea8507e8eef8.payload'
|
|
*
|
|
* @param Id The payload identifier used to create the file path.
|
|
* @param OutPath Will be reset and then assigned the resulting file path.
|
|
* The string builder must have a capacity of at least 52 characters
|
|
to avoid reallocation.
|
|
*/
|
|
void PayloadIdToPath(const FPayloadId& Id, FStringBuilderBase& OutPath);
|
|
|
|
/**
|
|
* Converts a FPayloadId into a file path.
|
|
*
|
|
* See above for further details
|
|
*
|
|
* @param Id The payload identifier used to create the file path.
|
|
* @return The resulting file path.
|
|
*/
|
|
FString PayloadIdToPath(const FPayloadId& Id);
|
|
|
|
/**
|
|
* Fill in the given string builder with the human readable message of the current system
|
|
* code, followed by the code value itself.
|
|
* In the system value is currently 0, then we assume that it was cleared before this was
|
|
* able to be called and write that the error is unknown instead of assuming that the
|
|
* operation was a success.
|
|
*/
|
|
void GetFormattedSystemError(FStringBuilderBase& SystemErrorMessage);
|
|
|
|
} // namespace UE::Virtualization::Utils
|