PosixShell mixin
Provides a number of helper functions for posix based shells.
You would normally access these methods via:
Shell.current;
Occasionally you might need to access some posix specific functionality in which case (assuming you are running a posix shell) you can use:
(Shell.current as PosixShell);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPrivilegedProcess → bool
-
True if the processes real uid is root.
no setter
- isPrivilegedUser → bool
-
True if the processes effictive uid is root.
no setter
- isSudo → bool
-
Returns true if we are currently running under sudo.
no setter
- loggedInUser → String
-
returns the username of the logged in user.
no setter
- loggedInUsersHome → String
-
Attempts to retrive the logged in user's home directory.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkInstallPreconditions(
) → String? - at this point no posix system has any preconditions.
-
install(
{bool installDart = false}) → bool - Install dart/dcli
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
privilegesRequiredMessage(
String app) → String - The message used during installation if it needs to be run with sudo.
-
releasePrivileges(
) → void - revert uid and gid to original user's id's
-
toString(
) → String -
A string representation of this object.
inherited
-
withPrivileges(
RunPrivileged privilegedCallback) → void -
Run
privilegedCallback
with root UID and gid
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited