Sign in Join
FPDoc Onlineexperiment

LazFileCache unit

Implements a caching mechanism for file and directory state information.

lazfilecache.pas implement a caching mechanism used for file and directory state information. It is used in the implementation of the Lazarus IDE, and in the LCL package system.

lazfilecache.pas is part of the LazUtils package.

Classes and records

TFileStateCacheclassImplements a state caching mechanism for files and directories.
TFileStateCacheItemclassContains information about a file or directory in the state caching mechanism.

Procedures and functions

CompareFilenameWithFileStateCacheItemfunctionCompares a value to a file name in a TFileStateCacheItem instance.
CompareFileStateItemsfunctionGets the relative order for the file names in the specified TFileStateCacheItem entries.
DirectoryIsWritableCachedfunctionGets the Directory is Writable flag value for the specified path.
DirPathExistsCachedfunctionGets the Path Exists flag value for the specified directory path.
FileAgeCachedfunctionGets the file age for the specified file or directory.
FileExistsCachedfunctionGets the File Exists flag value for the specified file name.
FileIsExecutableCachedfunctionGets the File is Executable flag value for the specified file name.
FileIsReadableCachedfunctionGets the File is Readable flag value for the specified file name.
FileIsTextCachedfunctionGets the File is Text flag for the specified file name.
FileIsWritableCachedfunctionGets the File is Writable flag value for the specified file name.
GetPhysicalFilenameCachedfunctionGets the physical file name for the specified file or directory name.
InvalidateFileStateCacheprocedureInvalidates one or more items in the state cache.
LUIncreaseChangeStampprocedureIncrements the specified Integer timestamp value.
LUIncreaseChangeStamp64procedureIncrements the specified Int64 timestamp value.

Types

TFileStateCacheItemFlagenumerationRepresents flag values used for files or directories in the state caching mechanism.
TFileStateCacheItemFlagssetSet type used to store TFileStateCacheItemFlag enumeration values.
TOnChangeFileStateTimeStampprocedure typeSpecifies an event handler signalled when the timestamp for a cached item is changed.
TOnFileAgeCachedprocedure typeSpecifies an event handler signalled to get the file age for an item in the cache.
TOnFileExistsCachedprocedure typeSpecifies an event handler signalled to get the "file exists" flag for an item in the cache.

Constants

LUInvalidChangeStampconstantInteger value used as the invalid timestamp value for the cache mechanism.
LUInvalidChangeStamp64constantInt64 value used as the invalid timestamp value for the cache mechanism.

Variables

FileStateCachevariableUnit global variable with the class instance for the state caching mechanism.
OnFileAgeCachedvariableEvent handler signalled to get the file age for the specified file name.
OnFileExistsCachedvariableEvent handler signalled to get the File Exists flag for the specified file name.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.