WSLApi class Null safety
WSL API
Constructors
- WSLApi()
Properties
- hashCode → int
-
The hash code for this object.
read-only, inherited
-
resultQueue
↔ List<
String> -
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
copy(
String distribution, String newName, {String location = defaultPath}) → Future< String> -
Copy a WSL distro by name
@param distribution: String
@param newName: String
@param location: String (optional)
@return Future
-
create(
String distribution, String filename, String installPath, dynamic status(String)) → Future -
Import a WSL distro by name
@param distribution: String
@param installPath: String distro name or tar file
@param filename: String
@return Future
-
editConfig(
) → void - Open wslconfig file
-
editDistroConfig(
String distroname) → void - Open distro config file
-
exec(
String distribution, List< String> cmds) → Future<List< int> > -
Executes a command in a WSL distro. passwd will open a shell
@param distribution: String
@param cmd: List
@return Future<List > -
execCmdAsRoot(
String distribution, String cmd) → Future< String> -
Executes a command in a WSL distro and returns the output
@param distribution: String
@param cmd: String
@return Future
-
execCmds(
String distribution, List< String> cmds, {required dynamic onMsg(String), required Function onDone}) → Future<List< int> > -
Executes a command list in a WSL distro
@param distribution: String
@param cmd: List
@return Future<List > -
export(
String distribution, String location) → Future< String> -
Export a WSL distro by name
@param distribution: String
@param location: String
@return Future
-
getCurrentOutput(
) → String - Get the current cached output @return String
-
getDownloadable(
String repo, dynamic onError(String)) → Future< List< String> > -
Returns list of downloadable WSL distros
@return Future<List
> -
getSize(
String distroName) → String? - Get distro size
-
import(
String distribution, String installLocation, String filename) → Future< String> -
Import a WSL distro by name
@param distribution: String
@param installLocation: String
@param filename: String
@return Future
-
install(
String distribution) → Future< String> -
Install a WSL distro by name
@param distribution: String
@return Future
-
installWSL(
) → void - Install WSL
-
list(
) → Future< Instances> -
Returns list of WSL distros
@return Future
-
listRunning(
) → Future< List< String> > -
Returns list of WSL distros
@return Future<List
> -
mkRootDir(
{String path = defaultPath}) → void - Create directory
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
openBashrc(
String distribution) → Future< String> - Open bashrc with notepad from WSL @param distribution: String
-
readConfig(
) → Future< Map< String, String> > - Read wslconfig file @return Future<Map<String, String>>
-
remove(
String distribution) → Future< String> -
Remove a WSL distro by name
@param distribution: String
@return Future
-
restart(
) → Future< String> -
Restart WSL
@return Future
-
shutdown(
) → Future< String> -
Shutdown WSL
@return Future
-
start(
String distribution, {String startPath = '', String startUser = '', String startCmd = ''}) → void - Start a WSL distro by name @param distribution: String @param startPath: String (optional) Defaults to root ('/')
-
startExplorer(
String distribution, {String path = ''}) → void - Start Explorer @param distribution: String
-
startVSCode(
String distribution, {String path = ''}) → void - Start VSCode @param distribution: String
-
stop(
String distribution) → Future< String> -
Stop a WSL distro by name
@param distribution: String
@return Future
-
toString(
) → String -
A string representation of this object.
inherited
-
utf8Convert(
List< int> bytes) → String -
Convert bytes to human readable string while removing non-ascii characters
@param bytes: List
@return String -
writeConfig(
String text) → void - Write wslconfig file
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited