![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GenericPlatformProcess.h>
Inheritance diagram for IProcessSentinel:Public Member Functions | |
| virtual bool | CreateSentinelFile (const TCHAR *Name, const FString &Contents)=0 |
Static Public Member Functions | |
| static bool CORE_API | DoesSentinelFileExist (const TCHAR *Name, FString *OptionalOutContents=nullptr) |
Protected Member Functions | |
| virtual FString CORE_API | MakeFilename (const TCHAR *Name) |
| virtual bool | DoesSentinelFileExistImpl (const TCHAR *Name, FString *OptionalOutContents=nullptr)=0 |
A helper class that creates and checks for existence of a sentinel file that can be tied to process lifetime. NOTE: The generic version will not handle the case where a process just dies without crashing - the file will not be deleted. The three desktop platforms have subclasses that will make sure that DoesSentinelFileExist will return false if the process that created it is not running. DO NOT assume FileExists() type calls would be accurate (and also there's not a public method to retrieve the path to discourage such a check anyway).
|
pure virtual |
Create the sentinel file, if possible
Implemented in FGenericProcessSentinel, FPosixOSProcessSentinel, and FWindowsProcessSentinel.
|
static |
Query for existence of a sentinel file (usually from another process than created it)
|
protectedpure virtual |
The actual implementation to determine if the sentinel file is exists and is valid (due to a process dying, the file may actually exist on disk, but isn't a valid file anymore, so a simple FileExists may not be good enough
Implemented in FPosixOSProcessSentinel, and FWindowsProcessSentinel.
|
protectedvirtual |
Helper to create the path for the sentinel file. Defaults to ProcessIntermediate() dir