FileUtilities class

Pure dart classes and methods for HydroloGIS projects. File path and folder utilities.

Constructors

FileUtilities()

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

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 by ext.
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) String
readFileBytes(String filePath) List<int>
readFileToHashMap(String filePath, {String separator = "=", bool valueFirst = false}) Map<String, String>
Method to read a properties file into a hashmap. [...]
readFileToList(String filePath) List<String>
writeBytesToFile(String filePath, List<int> bytesToWrite) → void
writeStringToFile(String filePath, String stringToWrite) → void