SessionFiles class

Working directory of one story session.

Every intermediate file (captures, copies, overlays, thumbnails, cached music) is created here and removed by delete. Only the exported result is written elsewhere (see exportDirectory).

Constructors

SessionFiles.at(Directory directory)
Uses an existing directory (tests).
factory

Properties

directory → Directory
The session directory.
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

adopt(String path, {String? extension}) → Future<String>
Moves path into the session directory unless it is already inside.
delete() → Future<void>
Deletes the session directory and everything in it.
newPath(String extension, {String prefix = 'file'}) → String
A new unique path inside the session with extension (no dot).
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 Methods

create({Duration staleAfter = const Duration(hours: 12)}) → Future<SessionFiles>
Creates the session directory and removes leftovers of sessions older than staleAfter (e.g. after a crash).
exportDirectory(String? configured) → Future<Directory>
Directory for exported results; not deleted with the session.