Navigation
API > API/Developer > API/Developer/DirectoryWatcher
Inheritance Hierarchy
- FSharedFromThisBase
- TSharedFromThis
- IAsyncFileCacheTask
- FAsyncDirectoryReader
References
| Module | DirectoryWatcher |
| Header | /Engine/Source/Developer/DirectoryWatcher/Public/FileCache.h |
| Include | #include "FileCache.h" |
Syntax
struct FAsyncDirectoryReader : public DirectoryWatcher::IAsyncFileCacheTask
Remarks
Class responsible for 'asynchronously' scanning a folder for files and timestamps. Example usage: FAsyncDirectoryReader Reader(TEXT("C:\Path"), EPathType::Relative);
while(!Reader.IsComplete()) { FPlatformProcess::Sleep(1); Reader.Tick(FTimedSignal(1)); // Do 1 second of work } TOptional
Constructors
| Type | Name | Description | |
|---|---|---|---|
FAsyncDirectoryReader
(
const FString& InDirectory, |
Constructor that sets up the directory reader to the specified directory |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TOptional< FDirectoryState > | Retrieve the cached state supplied to this class through UseCachedState(). | ||
| TArray< FFilenameAndHash > | Retrieve the cached state supplied to this class through UseCachedState(). | ||
| TOptional< FDirectoryState > | GetLiveState () |
Get the state of the directory once finished. | |
| void | SetMatchRules
(
const FMatchRules& InRules |
Set what files are relevant to this reader. | |
| void | UseCachedState
(
FDirectoryState InCachedState |
Instruct the directory reader to use the specified cached state to lookup file hashes, where timestamps haven't changed |
Overridden from IAsyncFileCacheTask
| Type | Name | Description | |
|---|---|---|---|
| bool | IsComplete () |
Returns true when this directory reader has finished scanning the directory | |
| EProgressResult | Tick
(
const FTimeLimit& Limit |
Tick this reader (discover new directories / files). Returns progress state. |