FileExtension extension

Wrapper around dart:io's File class.

on

Methods

copy_(String destination) Future<void>
Copies the File to the specified destination.
create_() Future<void>
Creates the File.
lastModified_() FutureOr<DateTime?>
Returns last modified timestamp of the File. Returns null if the File does not exist.
lastModifiedSync_() DateTime?
Returns last modified timestamp of the File. Returns null if the File does not exist.
length_() FutureOr<int>
Returns size the File in bytes. Returns 0 if the File does not exist.
lengthSync_() int
Returns size the File in bytes. Returns 0 if the File does not exist.
readAsBytes_() FutureOr<Uint8List?>
Reads the contents of the File as Uint8List. Returns null if the File does not exist.
readAsString_() FutureOr<String?>
Reads the contents of the File as String. Returns null if the File does not exist.
rename_(String destination) Future<void>
Renames the File to the specified destination.
write_(dynamic content, {bool history = false}) Future<void>
Writes the content to the File.