Sign in Join
FPDoc Onlineexperiment

TFileStateCache class

In unit LazFileCache

Implements a state caching mechanism for files and directories.

Declaration

pascal
TFileStateCache = class

Description

TFileStateCache is a class which implements a state caching mechanism for files and directories. TFileStateCache uses an internal AVL tree to store TFileStateCacheItem instances for the items in the state caching mechanism. The tree stores values sorted in file name (or path) order.

The TimeStamp property contains a counter value, assigned in the constructor, which is maintained when items are added or updated in cache storage. The value is assigned to cached items, and provides an indication when the cached item may be out-of-date in the cache.

TFileStateCache provides methods to add and update items in the cache, and to access and verify state flags for the TFileStateCacheItem instances.

See also

Properties

TimeStamppublicTimestamp (or revision) value for the cache storage.

Methods

CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
LockpublicIncrements the lock count for the caching mechanism.
UnlockpublicDecrements the lock count for the caching mechanism.
LockedpublicIndicates Lock has been called without a corresponding Unlock call.
IncreaseTimeStamppublicIncrements the change counter or updates an item in the state cache.
FileExistsCachedpublicEnsures that a cached item has an up-to-date "file exists" flag value.
DirPathExistsCachedpublicEnsures that a cached item has an up-to-date "directory path exists" flag value.
DirectoryIsWritableCachedpublicEnsures that a cached item has an up-to-date "Directory is Writable" flag.
FileIsExecutableCachedpublicEnsures that the "File is Executable" flag is up-to-date for a cache item.
FileIsReadableCachedpublicEnsures that the "File is Readable" flag is up-to-date for a cache item.
FileIsWritableCachedpublicEnsures that the "File is Writable" flag is up-to-date for a cache item.
FileIsTextCachedpublicEnsures that the "File is Text" flag is up-to-date for a cache item.
FileAgeCachedpublicEnsures that the file age is up-to-date for a cache item.
GetPhysicalFilenameCachedpublicResolves the specified file name to a physical file on the local file system.
FindFilepublicGets (or creates) the cached item with the specified name.
CheckpublicChecks the specified cache item to get a specific flag value.
AddChangeTimeStampHandlerpublicAdds the specified handler routine to the class instance.
RemoveChangeTimeStampHandlerpublicRemoves the specified handler routine in the class instance.
CalcMemSizepublicGets the memory size needed for the class instance and its data.

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