FFileCache

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

Unreal Engine C++ API Reference > Developer > DirectoryWatcher

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

Type Name Description
  FFileCache ( const FFileCacheConfig& InConfig ) Construction from a config
  FFileCache ( const FFileCache& )  

Destructors

Type Name Description
  ~FFileCache () Destructor

Functions

Type Name Description
void CompleteTransaction ( FUpdateCacheTransaction&& Transact... ) Return a transaction to the cache for completion.
void Destroy () Destroy this cache. Cleans out the in-memory state and deletes the cache file, if present.
TArray< FUpd... FilterOutstandingChanges ( TFunctionRef< bool(const FUpdateCac... ) Get pending changes to the cache.
const FFileD... FindFileData ( FImmutableString InFilename ) Attempt to locate file data pertaining to the specified filename.
const FStrin... GetDirectory () Get the absolute path of the directory this cache reflects
int32 GetNumDirtyFiles () Get the number of pending changes to the cache.
TArray< FUpd... GetOutstandingChanges ()  
bool HasStartedUp () Check whether this file cache has finished starting up yet.
void IgnoreDeletedFile ( const FString& Filename )  
void IgnoreFileModification ( const FString& Filename )  
void IgnoreMovedFile ( const FString& SrcFilename, const FString& DstFilename )  
void IgnoreNewFile ( const FString& Filename ) Report an external change to the manager, such that a subsequent equal change reported by the os be ignored
void IterateOutstandingChanges ( TFunctionRef< bool(const FUpdateCac... ) Iterate the number of pending changes to the cache with the specified predicate.
bool MoveDetectionInitialized () Check whether this move/rename detection has been initiated or not.
void Tick () Tick this FileCache
void WriteCache () Write out the cached file, if we have any changes to write

Operators

Type Name Description
FFileCache & operator= ( const FFileCache& )  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library