Run class

Constructors

Run()

Properties

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

Methods

asExec(String filePath, {bool sudo = false}) Future<bool>
give filePath executable permissions If sudo is true, the file will be given executable permissions with sudo
copy(String oldPath, String newPath, {dynamic sudo = false, dynamic recursive = false, dynamic force = false, dynamic preserve = false}) Future<bool>
Copy oldPath to newPath If sudo is true, the file will be copied with sudo permissions If recursive is true, the file will be copied recursively If force is true, the file will be copied even if it already exists If preserve is true, the file will be copied preserving the original permissions
delete(String filePath, {dynamic sudo = false, dynamic recursive = false, dynamic force = false}) Future<bool>
Delete filePath If sudo is true, the file will be deleted with sudo permissions If recursive is true, the file will be deleted recursively If force is true, the file will be deleted even if it is read-only
exists(String filePath, {dynamic sudo = false}) Future<bool>
Check if filePath exists If sudo is true, the file will be checked with sudo permissions
move(String $oldPath, String $newPath, {dynamic sudo = false, dynamic force = false, dynamic recursive = false, dynamic preserve = false}) Future<bool>
Rename or move oldPath to newPath If sudo is true, the file will be moved with sudo permissions
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
simple(String script, List<String> args, {void onProgress(String)?, bool quiet = false, bool sudo = false}) Future<ProcessResult>
Run a command on the system If sudo is true, the command will be run with sudo permissions If onProgress is provided, it will be called with the output of the command
toString() String
A string representation of this object.
inherited
touch(String filePath, {dynamic sudo = false}) Future<bool>
Create an empty file at filePath If sudo is true, the file will be created with sudo permissions
writeToFile(String filePath, String text, {dynamic sudo = false}) Future<bool>
Write text to filePath If sudo is true, the file will be written with sudo permissions

Operators

operator ==(Object other) bool
The equality operator.
inherited