Cached IsPath
TanayLabUtilities.CachedIsPath
—
Module
TanayLabUtilities.CachedIsPath.cached_ispath
—
Function
cached_ispath(path::AbstractString)::Bool
Same as
ispath
, except that if less than
IS_PATH_CACHE_TIMEOUT_NS
has passed since the last time
cached_ispath
was called for the same path, we reuse the result. If
IS_PATH_CACHE_TIMEOUT_NS
is zero, this ignores the cache and simply calls
ispath
.
TanayLabUtilities.CachedIsPath.empty_ispath_cache!
—
Function
empty_ispath_cache!(path::Maybe{AbstractString} = nothing)::Nothing
Empty the
cached_ispath
cache. If a path is specified, only clears the cached entry for this path (and every other file in the same directory).
TanayLabUtilities.CachedIsPath.IS_PATH_CACHE_TIMEOUT_NS
—
Constant
How long to hold on to
ispath
results before going back to the OS and asking for an updated result. By default, this is set to 1 second (10^9 ns). If this is zero then
cached_ispath
ignores the cache and simply calls
ispath
.