UnrealModFramework
Mod framework API
Toggle main menu visibility
Loading...
Searching...
No Matches
ModDirectoryWatcher.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Nelaric Contributors
3
#pragma once
4
5
#include "Containers/Set.h"
6
#include "Containers/UnrealString.h"
7
#include "Templates/UniquePtr.h"
8
9
namespace
Mod::IO
10
{
12
struct
FDirectoryChanges
13
{
15
TSet<FString>
Names
;
17
bool
bRescan
=
false
;
18
};
19
21
class
HAL_API
FDirectoryWatcher
final
22
{
23
public
:
25
FDirectoryWatcher
();
26
28
~FDirectoryWatcher
();
29
37
bool
Start
(
const
FString& Directory);
38
40
void
Stop
();
41
46
FDirectoryChanges
ReadChanges
();
47
52
bool
IsActive
()
const
;
53
54
private
:
55
struct
FNativeWatch;
56
TUniquePtr<FNativeWatch> Native;
57
};
58
}
// namespace Mod::IO
Mod::IO::FDirectoryWatcher::~FDirectoryWatcher
~FDirectoryWatcher()
Releases the native watch and any pending notifications.
Mod::IO::FDirectoryWatcher::Stop
void Stop()
Releases the active registration.
Mod::IO::FDirectoryWatcher::IsActive
bool IsActive() const
Checks whether the native registration is active.
Mod::IO::FDirectoryWatcher::Start
bool Start(const FString &Directory)
Starts a watch, replacing any previous registration.
Mod::IO::FDirectoryWatcher::FDirectoryWatcher
FDirectoryWatcher()
Constructs an inactive watch on the calling thread.
Mod::IO::FDirectoryWatcher::ReadChanges
FDirectoryChanges ReadChanges()
Takes the available notifications without waiting.
Mod::IO::FDirectoryChanges
Changes collected from a physical directory since the last read.
Definition
ModDirectoryWatcher.h:13
Mod::IO::FDirectoryChanges::bRescan
bool bRescan
A scan is needed because the OS could not report all names.
Definition
ModDirectoryWatcher.h:17
Mod::IO::FDirectoryChanges::Names
TSet< FString > Names
Names of changed entries relative to the watched directory.
Definition
ModDirectoryWatcher.h:15
ModRuntime
Source
Runtime
Core
HAL
Public
ModDirectoryWatcher.h
Generated by
1.18.0