dependency_manager
library
Classes
-
Ansi
-
Helper class for ANSI escape sequence detection and management.
-
AnsiColor
-
ANSI color management class for terminal text formatting.
-
ArgParser
-
A class for taking a list of raw command line arguments and parsing out
options and flags from them.
-
ArgResults
-
The results of parsing a series of command line arguments using
ArgParser.parse.
-
CollectionStyle
-
An enum of collection styles.
-
Command<T>
-
A single command.
-
CommandlineConverter
-
Command-line string parsing utilities.
-
CommandRunner<T>
-
A class for invoking Commands based on raw command-line arguments.
-
Context
-
An instantiable class for manipulating paths. Unlike the top-level
functions, this lets you explicitly select what platform the paths will use.
-
Find
-
Implementation for the
_find function.
-
FindItem
-
Holds details of a file system entity returned by the
find function.
-
FindProgress
-
Progress tracker for find operations.
-
InternalProgress
-
Base class for operations that return progress information.
-
Loading
-
Loading animation manager for CLI applications.
-
Option
-
A command-line option.
-
OptionType
-
What kinds of values an option accepts.
-
PathMap<V>
-
A map whose keys are paths, compared using p.equals and p.hash.
-
PathSet
-
A set containing paths, compared using p.equals and p.hash.
-
ScalarStyle
-
An enum of source scalar styles.
-
Style
-
An enum type describing a "flavor" of path.
-
TagDirective
-
A directive describing a custom tag handle.
-
VersionDirective
-
A directive indicating which version of YAML a document was written to.
-
Which
-
Search results container for executable location queries.
-
WhichSearch
-
Individual search result for a single PATH directory.
-
YamlDocument
-
A YAML document, complete with metadata.
-
YamlList
-
A read-only List parsed from YAML.
-
YamlMap
-
A read-only Map parsed from YAML.
-
YamlNode
-
An interface for parsed nodes from a YAML source tree.
-
YamlScalar
-
A wrapped scalar value parsed from YAML.
Functions
-
absolute(String part1, [String? part2, String? part3, String? part4, String? part5, String? part6, String? part7, String? part8, String? part9, String? part10, String? part11, String? part12, String? part13, String? part14, String? part15])
→ String
-
Returns a new path with the given path parts appended to current.
-
basename(String path)
→ String
-
Gets the part of
path after the last separator.
-
basenameWithoutExtension(String path)
→ String
-
Gets the part of
path after the last separator, and without any trailing
file extension.
-
black(String text, {AnsiColor background = AnsiColor.white, bool bold = true})
→ String
-
Apply black color to text.
-
blue(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply blue color to text.
-
canonicalize(String path)
→ String
-
Canonicalizes
path.
-
copy(String from, String to, {bool overwrite = false})
→ void
-
Copy a file from one location to another.
-
copyTree(String from, String to, {bool overwrite = false, bool filter(String file) = _allowAll, bool includeHidden = false, bool recursive = true})
→ void
-
Copy an entire directory tree from one location to another.
-
createDir(String path, {bool recursive = true})
→ String
-
Create a directory at the specified path.
-
cyan(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply cyan color to text.
-
delete(String path)
→ void
-
Delete a file from the file system.
-
deleteDir(String path, {bool recursive = true})
→ void
-
Delete a directory from the file system.
-
dirname(String path)
→ String
-
Gets the part of
path before the last separator.
-
equals(String path1, String path2)
→ bool
-
Returns
true if path1 points to the same location as path2, and
false otherwise.
-
exists(String path, {bool followLinks = true})
→ bool
-
File system existence and type checking utilities.
-
extension(String path, [int level = 1])
→ String
-
Gets the file extension of
path: the portion of basename from the last
. to the end (including the . itself).
-
find(String pattern, {bool caseSensitive = false, bool recursive = true, bool includeHidden = false, String workingDirectory = '.', List<FileSystemEntityType> types = const [Find.file]})
→ FindProgress
-
Find files and directories matching a glob pattern.
-
findCore(String pattern, {required ProgressCallback progress, bool caseSensitive = false, bool recursive = true, bool includeHidden = false, String workingDirectory = '.', List<FileSystemEntityType> types = const [Find.file]})
→ void
-
Returns the list of files in the current and child
directories that match the passed glob pattern.
-
fromUri(Object? uri)
→ String
-
Returns the path represented by
uri, which may be a String or a Uri.
-
green(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply green color to text.
-
grey(String text, {double level = 0.5, AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply grey color to text with adjustable brightness level.
-
hash(String path)
→ int
-
Returns a hash code for
path such that, if equals returns true for two
paths, their hash codes are the same.
-
isAbsolute(String path)
→ bool
-
Returns
true if path is an absolute path and false if it is a
relative path.
-
isDirectory(String path)
→ bool
-
Check if a path points to a directory.
-
isLink(String path)
→ bool
-
Check if a path points to a symbolic link.
-
isRelative(String path)
→ bool
-
Returns
true if path is a relative path and false if it is absolute.
On POSIX systems, absolute paths start with a / (forward slash). On
Windows, an absolute path starts with \\, or a drive letter followed by
:/ or :\.
-
isRootRelative(String path)
→ bool
-
Returns
true if path is a root-relative path and false if it's not.
-
isWithin(String parent, String child)
→ bool
-
Returns
true if child is a path beneath parent, and false otherwise.
-
join(String part1, [String? part2, String? part3, String? part4, String? part5, String? part6, String? part7, String? part8, String? part9, String? part10, String? part11, String? part12, String? part13, String? part14, String? part15, String? part16])
→ String
-
Joins the given path parts into a single path using the current platform's
separator. Example:
-
joinAll(Iterable<String> parts)
→ String
-
Joins the given path parts into a single path using the current platform's
separator. Example:
-
loadYaml(String yaml, {Uri? sourceUrl, bool recover = false, ErrorListener? errorListener})
→ dynamic
-
Loads a single document from a YAML string.
-
loadYamlDocument(String yaml, {Uri? sourceUrl, bool recover = false, ErrorListener? errorListener})
→ YamlDocument
-
Loads a single document from a YAML string as a YamlDocument.
-
loadYamlDocuments(String yaml, {Uri? sourceUrl})
→ List<YamlDocument>
-
Loads a stream of documents from a YAML string.
-
loadYamlNode(String yaml, {Uri? sourceUrl, bool recover = false, ErrorListener? errorListener})
→ YamlNode
-
Loads a single document from a YAML string as a YamlNode.
-
loadYamlStream(String yaml, {Uri? sourceUrl})
→ YamlList
-
Loads a stream of documents from a YAML string.
-
magenta(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply magenta color to text.
-
move(String from, String to, {bool overwrite = false})
→ void
-
Move a file from one location to another.
-
moveDir(String from, String to)
→ Future<void>
-
Move a directory from one location to another.
-
normalize(String path)
→ String
-
Normalizes
path, simplifying it by handling .., and ., and
removing redundant path separators whenever possible.
-
orange(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply orange color to text.
-
prettyUri(Object? uri)
→ String
-
Returns a terse, human-readable representation of
uri.
-
printerr(String? line)
→ void
-
Write a message to stderr (standard error output).
-
printerrMessage(String? message)
→ void
-
-
printMessage(String? message)
→ void
-
Global console output utilities with loading animation support.
-
read(String path)
→ List<String>
-
File reading utilities for text files.
-
readFile(String path)
→ String
-
Read the entire content of a text file as a single string.
-
red(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
ANSI color utility functions for terminal text formatting.
-
relative(String path, {String? from})
→ String
-
Attempts to convert
path to an equivalent relative path from the current
directory.
-
replace(String path, Pattern existing, String replacement, {bool all = false})
→ int
-
Text replacement utilities for file content modification.
-
resolveSymLink(String pathToLink)
→ String
-
Resolves a symbolic link to its target path.
-
rootPrefix(String path)
→ String
-
Returns the root of
path, if it's absolute, or the empty string if it's
relative.
-
setExtension(String path, String extension)
→ String
-
Returns
path with the trailing extension set to extension.
-
split(String path)
→ List<String>
-
Splits
path into its components using the current platform's separator.
-
touch(String path, {bool create = false})
→ String
-
Create a file or update its timestamps.
-
toUri(String path)
→ Uri
-
Returns the URI that represents
path.
-
truepath(String part1, [String? part2, String? part3, String? part4, String? part5, String? part6, String? part7])
→ String
-
Path normalization and resolution utilities.
-
which(String appname, {bool first = true, bool verbose = false, bool extensionSearch = true, void progress(WhichSearch)?})
→ Which
-
Path search utilities for finding executable applications.
-
white(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply white color to text.
-
withoutExtension(String path)
→ String
-
Removes a trailing extension from the last part of
path.
-
yellow(String text, {AnsiColor background = AnsiColor.none, bool bold = true})
→ String
-
Apply yellow color to text.