LiveNodeProfile class

A node's profile file, followed while the node runs, so an edit (by hand, or by omnyshell node profile sync from another process) applies to the next session without restarting the node.

envFor re-reads the file on every call. It is a few hundred bytes, read once per session, and comparing its text (not its modification time, whose resolution can hide two quick edits) decides whether to parse it again.

${VAR} references are expanded per call against the environment the session will get, so PATH: "C:\tools;${PATH}" follows a PATH that has changed since (see liveProcessEnvironment) instead of freezing it.

Constructors

LiveNodeProfile({String? path, void onWarning(String message)?})
Follows the profile at path (default: NodeProfile.defaultPath).

Properties

hashCode → int
The hash code for this object.
no setterinherited
onWarning → void Function(String message)?
Told when an edited profile cannot be parsed or read; the last good one stays in effect until the file is fixed. Called once per distinct broken text, and once per spell of the file being unreadable.
final
path → String
The profile file followed.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

envFor([Map<String, String>? environment]) → Map<String, String>
The profile's variables for a session starting now, expanded against environment (default: this process's).
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