FileExtension extension
Wrapper around dart:io's File class.
- on
Methods
-
copy_(
String destination) → Future< void> -
Available on File, provided by the FileExtension extension
Copies the File to the specifieddestination
. -
create_(
) → Future< void> -
Available on File, provided by the FileExtension extension
Creates the File. -
lastModified_(
) → FutureOr< DateTime?> -
Available on File, provided by the FileExtension extension
Returns last modified timestamp of the File. Returns null if the File does not exist. -
lastModifiedSync_(
) → DateTime? -
Available on File, provided by the FileExtension extension
Returns last modified timestamp of the File. Returns null if the File does not exist. -
length_(
) → FutureOr< int> -
Available on File, provided by the FileExtension extension
Returns size the File in bytes. Returns 0 if the File does not exist. -
lengthSync_(
) → int -
Available on File, provided by the FileExtension extension
Returns size the File in bytes. Returns 0 if the File does not exist. -
readAsBytes_(
) → FutureOr< Uint8List?> -
Available on File, provided by the FileExtension extension
Reads the contents of the File as Uint8List. Returnsnull
if the File does not exist. -
readAsString_(
) → FutureOr< String?> -
Available on File, provided by the FileExtension extension
Reads the contents of the File as String. Returnsnull
if the File does not exist. -
rename_(
String destination) → Future< void> -
Available on File, provided by the FileExtension extension
Renames the File to the specifieddestination
. -
write_(
dynamic content, {bool history = false}) → Future< void> -
Available on File, provided by the FileExtension extension
Writes thecontent
to the File.