TFileStateCache class
Implements a state caching mechanism for files and directories.
Declaration
TFileStateCache = classDescription
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
TimeStamp | public | Timestamp (or revision) value for the cache storage. |
Methods
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Lock | public | Increments the lock count for the caching mechanism. |
Unlock | public | Decrements the lock count for the caching mechanism. |
Locked | public | Indicates Lock has been called without a corresponding Unlock call. |
IncreaseTimeStamp | public | Increments the change counter or updates an item in the state cache. |
FileExistsCached | public | Ensures that a cached item has an up-to-date "file exists" flag value. |
DirPathExistsCached | public | Ensures that a cached item has an up-to-date "directory path exists" flag value. |
DirectoryIsWritableCached | public | Ensures that a cached item has an up-to-date "Directory is Writable" flag. |
FileIsExecutableCached | public | Ensures that the "File is Executable" flag is up-to-date for a cache item. |
FileIsReadableCached | public | Ensures that the "File is Readable" flag is up-to-date for a cache item. |
FileIsWritableCached | public | Ensures that the "File is Writable" flag is up-to-date for a cache item. |
FileIsTextCached | public | Ensures that the "File is Text" flag is up-to-date for a cache item. |
FileAgeCached | public | Ensures that the file age is up-to-date for a cache item. |
GetPhysicalFilenameCached | public | Resolves the specified file name to a physical file on the local file system. |
FindFile | public | Gets (or creates) the cached item with the specified name. |
Check | public | Checks the specified cache item to get a specific flag value. |
AddChangeTimeStampHandler | public | Adds the specified handler routine to the class instance. |
RemoveChangeTimeStampHandler | public | Removes the specified handler routine in the class instance. |
CalcMemSize | public | Gets 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.
