src_non_web/_all_src_non_web.g library

Functions

clearFile(String filePath) Future<void>
Clears the contents of the file located at filePath.
deleteFile(String filePath) Future<void>
Deletes the file located at filePath.
fileExists(String filePath) Future<bool>
Returns true if the file located at filePath exists.
findFileByName(String fileName, String directoryPath) Future<File?>
Finds a file with the given fileName in the directory located at directoryPath. Returns null if the directory does not exist or if the
getDesktopPath() String
Gets the current Operating System's Desktop path.
getPackageLibPath(String package) Future<String?>
Returns the path of the lib directory of package or null if the package is not found.
listFilePaths(String dirPath, {bool recursive = true}) Future<List<String>?>
Lists the file paths of the files in the directory located at dirPath. Set recursive to true to list the file paths of the files in the sub-directories as well.
readFile(String filePath) Future<String?>
Reads the contents of the file located at filePath as a String.
readFileAsLines(String filePath) Future<List<String>?>
Reads the contents of the file located at filePath as a list of lines.
writeFile(String filePath, String content, {bool append = false}) Future<void>
Writes the given content to the file located at filePath. Set append to true to append the content to the file instead of overwriting it.