FileHtmlArtifactStore class
Local HTML artifact store with content-addressed immutable object storage, atomic manifests, path containment, and instant zero-copy publication drafts.
Constructors
- FileHtmlArtifactStore(Directory root)
- FileHtmlArtifactStore.forTenant(Directory root, String tenantId)
-
Creates an isolated local store below
rootfor one trusted tenant ID.factory
Properties
-
activeVersion
→ Future<
String?> -
no setter
- capabilities → StorageCapabilities
-
Declares the real capabilities of this local filesystem store.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- root → Directory
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
beginVersion(
) → Future< String> - Creates a private draft with zero HTML file copying.
-
delete(
String path) → Future< void> -
deleteVersion(
String version, String path) → Future< void> -
discardVersion(
String version) → Future< void> -
exportActiveVersion(
Directory destination) → Future< void> -
Copies the current complete publication to a new static-host directory.
destinationmust not exist and must not overlap the artifact store. -
garbageCollect(
{Duration retentionGracePeriod = const Duration(minutes: 15), int maxRetainedVersions = 10}) → Future< GarbageCollectionReport> - Collects unreachable objects and cleans old versions while protecting active and rollback versions.
-
loadDependencies(
) → Future< Map< String, RouteDependency> > -
loadVersionDependencies(
String version) → Future< Map< String, RouteDependency> > -
loadVersionRoutePaths(
String version, String routeId) → Future< List< String> > -
loadVersionTagPaths(
String version, String tag) → Future< List< String> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publishVersion(
String version, {int? fencingEpoch, String? routePath}) → Future< void> -
read(
String path) → Future< String?> -
readPublished(
String path) → Future< PublishedHtmlArtifact?> - Reads HTML and its dependency record from the same active version.
-
readVersion(
String version, String path) → Future< String?> -
readVersionSitemap(
String version) → Future< String?> -
rollbackTo(
String targetVersion) → Future< void> - Rolls back publication atomically to a previous valid generation.
-
saveDependencies(
Map< String, RouteDependency> deps) → Future<void> -
saveRouteDependency(
String version, RouteDependency dep) → Future< void> -
Incrementally saves or updates a single route dependency in
versionshard without rewriting the entire route catalogue. -
saveVersionDependencies(
String version, Map< String, RouteDependency> deps) → Future<void> -
toString(
) → String -
A string representation of this object.
inherited
-
write(
String path, String html) → Future< void> -
writeVersion(
String version, String path, String html) → Future< void> -
writeVersionSitemap(
String version, Iterable< RouteDependency> dependencies) → Future<void>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited