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 atfilePath
exists. -
findFileByName(
String fileName, String directoryPath) → Future< File?> -
Finds a file with the given
fileName
in the directory located atdirectoryPath
. Returnsnull
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 ofpackage
ornull
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
. Setrecursive
totrue
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 atfilePath
. Setappend
totrue
to append thecontent
to the file instead of overwriting it.