FileUtils class Null safety

Constructors

FileUtils()

Properties

hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

basename(String name, {String? suffix}) String
Removes any leading directory components from name.
chdir(String name) bool
Changes the current directory to name. Returns true if the operation was successful; otherwise false.
dirempty(String name) bool
Returns true if directory is empty; otherwise false;
dirname(String name) String
Returns name with its trailing component removed.
exclude(List<String> files, String pattern, {void added(String path)?, bool? caseSensitive, void removed(String path)?}) List<String>
Returns a list of files from which will be removed elements that match glob pattern.
fullpath(String name) String
Returns the full name of the path if possible.
getcwd() String
Returns the path of the current directory.
glob(String pattern, {bool? caseSensitive, void notify(String path)?}) List<String>
Returns a list of files which match the specified glob pattern.
include(List<String> files, String pattern, {void added(String path)?, bool? caseSensitive, void removed(String path)?}) List<String>
Returns a list of paths from which will be removed elements that do not match glob pattern.
mkdir(List<String> names, {bool recursive = false}) bool
Creates listed directories and returns true if the operation was successful; otherwise false.
move(List<String> files, String dir) bool
Moves files files to the directory dir. Returns true if the operation was successful; otherwise false.
rename(String src, String dest) bool
Renames or moves src to dest. Returns true if the operation was successful; otherwise false.
rm(List<String> files, {bool directory = false, bool force = false, bool recursive = false}) bool
Removes the files and returns true if the operation was successful; otherwise false.
rmdir(List<String> names, {bool parents = false}) bool
Removes empty directories. Returns true if the operation was successful; otherwise false.
Creates the symbolic link to the target and returns true if the operation was successful; otherwise false.
testfile(String file, String test) bool?
Performs specified test on file and returns true if success; otherwise returns false;
touch(List<String> files, {bool create = true}) bool
Changes the modification time of the specified files. Returns true if the operation was successful; otherwise false.
uptodate(String file, [List<String>? depends]) bool
Returns true if file is newer than all depends; otherwise false.