Navigation
API > API/Runtime > API/Runtime/Core
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).
| Name | IProcessSentinel |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformProcess.h |
| Include Path | #include "GenericPlatform/GenericPlatformProcess.h" |
Syntax
class IProcessSentinel
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool CreateSentinelFile
(
const TCHAR* Name, |
Create the sentinel file, if possible | GenericPlatform/GenericPlatformProcess.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool DoesSentinelFileExistImpl
(
const TCHAR* Name, |
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 | GenericPlatform/GenericPlatformProcess.h | |
virtual FString MakeFilename
(
const TCHAR* Name |
Helper to create the path for the sentinel file. Defaults to ProcessIntermediate() dir | GenericPlatform/GenericPlatformProcess.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool DoesSentinelFileExist
(
const TCHAR* Name, |
Query for existence of a sentinel file (usually from another process than created it) | GenericPlatform/GenericPlatformProcess.h |