FileLogSessions class final

Reader for log sessions stored in a directory by FileLogStorage.

Listing, reading, and deletion ignore non-regular entries, including symlinks. Use an application-private directory. This is best-effort protection against accidental or pre-existing links, not a sandbox against another process that can race filesystem operations in the same directory.

Deleting the current session of an active FileLogStorage is unsupported. Await that storage's close() before deleting the session.

Constructors

FileLogSessions(String directory)

Properties

directory String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

exportTo(Directory target, {Iterable<FileLogSession>? sessions}) Future<List<File>>
Exports each of the given sessions (all by default) as a separate plain file <sessionId>.jsonl into target (created recursively).
gzipTo(File target, {Iterable<FileLogSession>? sessions}) Future<void>
Compresses the given sessions (all by default) into one GZIP-compressed JSON Lines file target.
list() Future<List<FileLogSession>>
All sessions in directory, sorted from oldest to newest (by last activity).
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