[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Implements a state caching mechanism for files and directories.
Source position: lazfilecache.pas line 61
type TFileStateCache = class |
||
public |
||
constructor Create; |
|
Constructor for the class instance. |
destructor Destroy; override; |
|
Destructor for the class instance. |
procedure Lock; |
|
Increments the lock count for the caching mechanism. |
procedure Unlock; |
|
Decrements the lock count for the caching mechanism. |
function Locked; |
|
Indicates Lock has been called without a corresponding Unlock call. |
procedure IncreaseTimeStamp(); |
|
Increments the change counter or updates an item in the state cache. |
function FileExistsCached(); |
|
Ensures that a cached item has an up-to-date "file exists" flag value. |
function DirPathExistsCached(); |
|
Ensures that a cached item has an up-to-date "directory path exists" flag value. |
function DirectoryIsWritableCached(); |
|
Ensures that a cached item has an up-to-date "Directory is Writable" flag. |
function FileIsExecutableCached(); |
|
Ensures that the "File is Executable" flag is up-to-date for a cache item. |
function FileIsReadableCached(); |
|
Ensures that the "File is Readable" flag is up-to-date for a cache item. |
function FileIsWritableCached(); |
|
Ensures that the "File is Writable" flag is up-to-date for a cache item. |
function FileIsTextCached(); |
|
Ensures that the "File is Text" flag is up-to-date for a cache item. |
function FileAgeCached(); |
|
Ensures that the file age is up-to-date for a cache item. |
function GetPhysicalFilenameCached(); |
|
Resolves the specified file name to a physical file on the local file system. |
function FindFile(); |
|
Gets (or creates) the cached item with the specified name. |
function Check(); |
|
Checks the specified cache item to get a specific flag value. |
procedure AddChangeTimeStampHandler(); |
|
Adds the specified handler routine to the class instance. |
procedure RemoveChangeTimeStampHandler(); |
|
Removes the specified handler routine in the class instance. |
function CalcMemSize; |
|
Gets the memory size needed for the class instance and its data. |
|
Timestamp (or revision) value for the cache storage. |
|
end; |
|
Implements a state caching mechanism for files and directories. |
|
| | ||
TObject |
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.
|
Contains information about a file or directory in the state caching mechanism. |
|
|
Set type used to store TFileStateCacheItemFlag enumeration values. |
|
|
Represents flag values used for files or directories in the state caching mechanism. |
Version 4.0 | Generated 2025-05-03 | Home |