FFileCache

A class responsible for scanning a directory, and maintaining a cache of its state (files and timestamps).

Windows
MacOS
Linux

References

Module

DirectoryWatcher

Header

/Engine/Source/Developer/DirectoryWatcher/Public/FileCache.h

Include

#include "FileCache.h"

Syntax

class FFileCache

Remarks

A class responsible for scanning a directory, and maintaining a cache of its state (files and timestamps). Changes in the cache can be retrieved through GetOutstandingChanges(). Changes will be reported for any change in the cached state even between runs of the process.

Constructors

Name Description

Public function

FFileCache

(
    const FFileCacheConfig& InConfig
)

Construction from a config

Public function

FFileCache

(
    const FFileCache&
)

Destructors

Name Description

Public function

~FFileCache()

Destructor

Functions

Name Description

Public function

void

 

CompleteTransaction

(
    FUpdateCacheTransaction&& Transact...
)

Return a transaction to the cache for completion.

Public function

void

 

Destroy()

Destroy this cache. Cleans out the in-memory state and deletes the cache file, if present.

Public function

TArray< FUpd...

 

FilterOutstandingChanges

(
    TFunctionRef< bool...
)

Get pending changes to the cache.

Public function Const

const FFileD...

 

FindFileData

(
    FImmutableString InFilename
)

Attempt to locate file data pertaining to the specified filename.

Public function Const

const FStrin...

 

GetDirectory()

Get the absolute path of the directory this cache reflects

Public function Const

int32

 

GetNumDirtyFiles()

Get the number of pending changes to the cache.

Public function

TArray< FUpd...

 

GetOutstandingChanges()

Public function Const

bool

 

HasStartedUp()

Check whether this file cache has finished starting up yet.

Public function

void

 

IgnoreDeletedFile

(
    const FString& Filename
)

Public function

void

 

IgnoreFileModification

(
    const FString& Filename
)

Public function

void

 

IgnoreMovedFile

(
    const FString& SrcFilename,
    const FString& DstFilename
)

Public function

void

 

IgnoreNewFile

(
    const FString& Filename
)

Report an external change to the manager, such that a subsequent equal change reported by the os be ignored

Public function Const

void

 

IterateOutstandingChanges

(
    TFunctionRef< bool...
)

Iterate the number of pending changes to the cache with the specified predicate.

Public function Const

bool

 

MoveDetectionInitialized()

Check whether this move/rename detection has been initiated or not.

Public function

void

 

Tick()

Tick this FileCache

Public function

void

 

WriteCache()

Write out the cached file, if we have any changes to write

Operators

Name Description

Public function

FFileCache &

 

operator=

(
    const FFileCache&
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss