Files
UnrealEngineUWP/Engine/Source/Developer/Virtualization/Private/VirtualizationFileBackend.h
paul chipchase 7d754545ee Reorganised the virtualization filesystem backend code.
#rb Mikko.Mononen
#rnx
#preflight 612cbc029db30900012a0dca

- Added a header file and moved the class declaration thereto make it easier for people to find the ini file documentation.
- Split some logging into multiple lines to reduce the overall width of the file.

#ROBOMERGE-SOURCE: CL 17365675 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17365683 by paul chipchase in ue5-release-engine-test branch]
2021-08-31 06:30:26 -04:00

44 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Virtualization/IVirtualizationBackend.h"
namespace UE::Virtualization
{
/**
* A basic backend based on the file system. This can be used to access/store virtualization
* data either on a local disk or a network share. It is intended to be used as a caching system
* to speed up operations (running a local cache or a shared cache for a site) rather than as the
* proper backend solution.
*
* Ini file setup:
* 'Name'=(Type=FileSystem, Path="XXX")
* Where 'Name' is the backend name in the hierarchy and 'XXX' if the path to the directory where
* you want to files to be stored.
*/
class FFileSystemBackend : public IVirtualizationBackend
{
public:
FFileSystemBackend(FStringView ConfigName);
virtual ~FFileSystemBackend() = default;
protected:
virtual bool Initialize(const FString& ConfigEntry) override;
virtual EPushResult PushData(const FPayloadId& Id, const FCompressedBuffer& Payload) override;
virtual FCompressedBuffer PullData(const FPayloadId& Id) override;
virtual FString GetDebugString() const override;
bool DoesExist(const FPayloadId& Id);
void CreateFilePath(const FPayloadId& PayloadId, FStringBuilderBase& OutPath);
FString Name;
FString RootDirectory;
};
} // namespace UE::Virtualization