FileUtilities class
Pure dart classes and methods for HydroloGIS projects. File path and folder utilities.
Constructors
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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 Properties
-
fallBackEncodings
↔ List<
Encoding> -
getter/setter pair
Static Methods
-
copyFile(
String fromPath, String toPath) → void -
getExtension(
String filePath) → String? -
getFilesInPathByExt(
String parentPath, [String? ext]) → List< String> -
Get the list of files names from a given
parentPath
and optionally filtered byext
. -
getTmpFile(
dynamic ext, {dynamic prefix = 'tmp_', dynamic postfix}) → File - Get a temporary file.
-
joinPaths(
String path1, String path2) → String -
listFiles(
String parentPath, {bool doOnlyFolder = false, List< String> ? allowedExtensions, bool doHidden = false, bool order = true}) → List<List> -
nameFromFile(
String filePath, bool withExtension) → String -
parentFolderFromFile(
String filePath) → String -
readFile(
String filePath, {Encoding encoding = utf8, dynamic saveMode = false}) → String -
readFileBytes(
String filePath) → List< int> -
readFileToHashMap(
String filePath, {String separator = "=", bool valueFirst = false, Encoding encoding = utf8, dynamic saveMode = false}) → Map< String, String> -
Method to read a properties
file
into a hashmap. -
readFileToList(
String filePath, {Encoding encoding = utf8, dynamic saveMode = false}) → List< String> -
writeBytesToFile(
String filePath, List< int> bytesToWrite) → void -
writeStringToFile(
String filePath, String stringToWrite) → void