io
library
Functions
-
checkDirectoryExists(String path, [String? name])
→ Directory
-
Check if the Directory at
path
exists, if not
throw an ArgumentError.
-
checkFileExists(String path, [String? name])
→ File
-
Check if the File at
path
exists, if not
throw an ArgumentError.
-
checkLeadsToFiletype(String path, FileSystemEntityType type)
→ void
-
Check that
path
leads to a FileSystemEntity of type
.
-
copyDirectory(String path, Directory target)
→ Future<Directory?>
-
Copy the directory at
path
recursively into target
.
-
copyDirectorySync(String path, Directory target)
→ Directory?
-
Copy the directory at
path
recursively into target
.
-
copyFile(String path, Directory target)
→ Future<File?>
-
Copy the file at
path
into target
.
-
copyFileSync(String path, Directory target)
→ File?
-
Copy the file at
path
into target
.
-
deleteSync(String path)
→ void
-
-
existsSync(String path)
→ bool
-
Returns true if any file or directory exists at
path
.
-
printErr(Object? object, [String end = "\n"])
→ void
-
Prints a string representation of
object
to stderr.
-
printOut(Object? object, [String end = "\n"])
→ void
-
Prints a string representation of
object
to stdout.
-
promptUntilValidPick<T extends Object>({required String prompt, required Set<T> options, required StringifiedPromptOption stringify(int index, T option), String onError(String input)?, String selectorFormatter(String selector)?, T? defaultValue, String separator = ")", String promptIndent = "", String optionsIndent = "\t", String errorIndent = ""})
→ Future<T>
-
Notice
-
promptUntilValidPickSync<T extends Object>({required String prompt, required Set<T> options, required StringifiedPromptOption stringify(int index, T option), String onError(String input)?, String selectorFormatter(String selector)?, T? defaultValue, String separator = ")", String promptIndent = "", String optionsIndent = "\t", String errorIndent = ""})
→ T
-
Notice
-
promptYesNo(String question, {bool defaultToYes = true})
→ Future<bool>
-
Notice
-
promptYesNoSync(String question, {bool defaultToYes = true})
→ bool
-
Notice
-
tryProcessRunSync(String executable, List<String> args, {String? workingDirectory, Map<String, String>? environment, bool includeParentEnvironment = true, bool runInShell = false, Encoding? stdoutEncoding = systemEncoding, Encoding? stderrEncoding = systemEncoding, void onProcessException(ProcessException exception, StackTrace stackTrace)?})
→ ProcessResult?
-
Tries to synchronously run the
executable
with the provided args
.