KnowledgeProjectFiles class final
The project files a write's Profile selection came from, which
KnowledgeWriter.commit checks under okf's exclusive bundle lock: each
absolute path with the SHA-256 of the bytes it held, or null for a file
that was absent.
For a bundle a wayfinder.json binds, they are that file, the
wayfinder.lock beside it, and each closer wayfinder.json path binding
looked at first, absent, since a configuration that appears there would
bind the bundle instead. For a bundle none binds, they are the
wayfinder.json paths binding looked at, each absent, so a
configuration that appears there, which would select a Profile, makes a
plan judged without one stale too.
A host captures them together with its own selection, before it selects
(forBundle, read) or from the bytes it read itself (the default
constructor), so a change between its selection and prepare is caught
as well.
Constructors
-
KnowledgeProjectFiles(Map<
String, String?> sha256) -
sha256maps each path to the lowercase hexadecimal SHA-256 of the bytes a host read (digest), or to null for a file that was absent.
Properties
Methods
-
changed(
) → Future< List< String> > - The tracked paths whose bytes differ now from sha256, in its order: changed, created or deleted. A path that is absent is null, the same as one that was absent when these files were captured. A path that exists but cannot be read throws FileSystemException; it is not treated as absent.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- none → KnowledgeProjectFiles
-
No project file, as for a selection a host built itself: a plan with
them is stale only when its bundle changes.
final
Static Methods
-
digest(
List< int> bytes) → String -
The SHA-256 of
bytesas sha256 records it: lowercase hexadecimal. -
forBundle(
String bundle, {String? configPath, String? projectRoot}) → Future< KnowledgeProjectFiles> -
The files binding
bundlereads, as they are now, found asWayfinderProjectConfig.bindfinds them:configPathwith thewayfinder.lockbeside it; or else eachwayfinder.jsonpath the search above the bundle, never aboveprojectRoot, looked at, closest first, ending with the one it found and thewayfinder.lockbeside it. The paths before the one it found are absent, and one that appears would bind the bundle instead. Reads no configuration's content. -
read(
String configPath) → Future< KnowledgeProjectFiles> -
wayfinder.jsonatconfigPathand thewayfinder.lockbeside it, as they are now.