Path: redb-route/redb.Route/Expressions/ObjectKeyFacts.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Expressions/ObjectKeyFacts.cs ---- namespace redb.Route.Expressions; /// /// The file facts of an object in an object store (S3, Firebase Storage), for the file keys in the options of their /// consumers. The name is the whole object key, as ${file:name} has always meant for S3 (in/a.csv waits /// for in/a.csv.done); the parent is the key prefix up to the last /. A key has no path of its own, so /// the path keys write nothing; the size and the time are the object's when the store gives them, otherwise nothing. /// internal sealed class ObjectKeyFacts(string objectKey, long? length = null, DateTimeOffset? lastModified = null) : IFileFacts { private int LastSlash => objectKey.LastIndexOf('/'); private int ExtensionDot => objectKey.LastIndexOf('.') is var dot && dot > LastSlash ? dot : -1; public string? Name => objectKey; public string? NameOnly => ExtensionDot < 0 ? objectKey : objectKey[..ExtensionDot]; public string? Extension => ExtensionDot < 0 ? "" : objectKey[(ExtensionDot + 1)..]; public string? Parent => LastSlash < 0 ? "" : objectKey[..LastSlash]; public string? AbsolutePath => null; public string? RelativePath => null; public long? Length => length; public DateTimeOffset? LastModified => lastModified; }