[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Checks the specified cache item to get a specific flag value.
Source position: lazfilecache.pas line 87
public function TFileStateCache.Check( |
const Filename: string; |
AFlag: TFileStateCacheItemFlag; |
out AFile: TFileStateCacheItem; |
var FlagIsSet: Boolean |
):Boolean; |
Filename |
|
File or directory to locate in the cache. |
AFlag |
|
Flag to examine for the cache item. |
AFile |
|
The cache item examined in the method. |
FlagIsSet |
|
True if the flag was tested and set for the cache item. |
True if the flag is has been tested and set for the cache item.
Check is a Boolean function used to check a flag value in a cache item with the name in Filename.
AFlag identifies the flag value checked for the cache item.
AFile contains the cache item used to get the value for the specified flag. The FindFile method is called to get (or create) a cache item for the specified file or directory name. AFile is an output parameter, and is used to return the TFileStateCacheItem instance to the caller.
Check ensures that the cache item is valid (recent) using the Timestamp for the class instance. When TimeStamp is more recent than the value in the cache item, the cache item is updated with the current Timestamp and its tested flags are cleared.
FlagIsSet is a variable parameter which contains the state for the specific flag. True indicates the flag is set for the cache item. False indicates that the flag was not already set in the cache item, or has not been tested after resetting the Timestamp for an invalid cache item.
The return value is True when the flag in AFlag is one of the tested flags in an existing cache item. It is False if the flag value has not been accessed in the cache item, or when the Timestamp for an invalid cache item was reset.
Check is used to implement methods which get or set specific flag values, including:
|
Gets (or creates) the cached item with the specified name. |
|
|
Timestamp (or revision) value for the cache storage. |
|
|
Ensures that a cached item has an up-to-date "file exists" flag value. |
|
|
Ensures that a cached item has an up-to-date "directory path exists" flag value. |
|
|
Ensures that a cached item has an up-to-date "Directory is Writable" flag. |
|
|
Ensures that the "File is Executable" flag is up-to-date for a cache item. |
|
|
Ensures that the "File is Readable" flag is up-to-date for a cache item. |
|
|
Ensures that the "File is Writable" flag is up-to-date for a cache item. |
|
|
Ensures that the "File is Text" flag is up-to-date for a cache item. |
|
|
Ensures that the file age is up-to-date for a cache item. |
|
|
Resolves the specified file name to a physical file on the local file system. |
|
|
Timestamp for the cached item. |
|
|
Contains status flags for the cached file or directory item. |
|
|
Contains status flags that have been tested for the cached item. |
Version 4.0 | Generated 2025-05-03 | Home |