file_source_is_current
Stable function · Cache
Tier: stable · Kind: function · Topic: Cache
| Python | Julia | Rust |
|---|---|---|
file_source_is_current | file_source_is_current | file_source_is_current |
Python
file_source_is_current(source: os.PathLike, manifest: Manifest) -> bool
Rung 0 as a yes/no: is the source provably the file that was ingested?
Only CURRENT is True. The cache does not use this — the
difference between MISSING, REPLACED and UNKNOWN is
exactly what it acts on — but it is the honest predicate for a caller that
just wants the question answered.
Julia
file_source_is_current(source::AbstractString, m::Manifest)
file_source_is_current(source, manifest) -> Bool
Rung 0 as a yes/no: is the source PROVABLY the file that was ingested? Only
[SOURCE_CURRENT] is true. The cache does not use this — the difference
between [SOURCE_MISSING], [SOURCE_REPLACED] and [SOURCE_UNKNOWN] is exactly
what it acts on — but it is the honest predicate for a caller that just wants the
question answered.
Rust
pub fn file_source_is_current(source: &Path, manifest: &Manifest) -> bool
Rung 0 as a yes/no: is the source provably the file that was ingested?
Only SourceState::Current is true. The cache does not use this — the
difference between Missing, Replaced and Unknown is exactly what it
acts on — but it is the honest predicate for a caller that just wants the
question answered.