FileScrewdriver extension

provides extensions for File

on

Properties

isEmpty → Future<bool>

Available on File, provided by the FileScrewdriver extension

Returns a Future containing a bool indicating whether this file is empty or not.
no setter
isEmptySync → bool

Available on File, provided by the FileScrewdriver extension

Returns true if this file is empty
no setter

Methods

appendBytes(List<int> value) → Future<void>

Available on File, provided by the FileScrewdriver extension

Appends value bytes at the end of the file.
appendBytesSync(List<int> value) → Future<void>

Available on File, provided by the FileScrewdriver extension

Appends value bytes at the end of the file.
appendFrom(File file) → Future<void>

Available on File, provided by the FileScrewdriver extension

Appends content of file at the end of this file.
appendFromSync(File file) → void

Available on File, provided by the FileScrewdriver extension

Appends content of file at the end of this file.
appendString(String value, {Encoding encoding = utf8}) → Future<void>

Available on File, provided by the FileScrewdriver extension

Appends value string at the end of the file using provided encoding.
appendStringLine(String value, {Encoding encoding = utf8}) → Future<void>

Available on File, provided by the FileScrewdriver extension

Appends value string as a new line at the end of the file using provided encoding.
appendStringSync(String value, {Encoding encoding = utf8}) → void

Available on File, provided by the FileScrewdriver extension

Appends value string at the end of the file using provided encoding.
clear({bool flush = false}) → Future<void>

Available on File, provided by the FileScrewdriver extension

Asynchronously flushes all the data in this file leaving it to be empty.
clearSync({bool flush = false}) → void

Available on File, provided by the FileScrewdriver extension

Synchronously flushes all the data in this file leaving it to be empty.
copyTo(File other) → Future<void>

Available on File, provided by the FileScrewdriver extension

Copies content of this to other file.
copyToSync(File other) → void

Available on File, provided by the FileScrewdriver extension

Copies content of this to other file.
createIfMissing({bool recursive = false, bool exclusive = false}) → Future<File>

Available on File, provided by the FileScrewdriver extension

Creates the file if it does not exist. Returns the file instance.
createIfMissingSync({bool recursive = false, bool exclusive = false}) → void

Available on File, provided by the FileScrewdriver extension

Synchronously creates the file if it does not exist.
deleteIfExists({bool recursive = false}) → Future<FileSystemEntity>

Available on File, provided by the FileScrewdriver extension

Deletes the file if it exists. Returns the deleted file instance or this if the file did not exist.
deleteIfExistsSync({bool recursive = false}) → void

Available on File, provided by the FileScrewdriver extension

Synchronously deletes the file if it exists.
onDeleted(void block()) → StreamSubscription<FileSystemEvent>

Available on File, provided by the FileScrewdriver extension

Calls block whenever the this file is deleted. Returns StreamSubscription which allows to cancel the listener.
onModified(void block()) → StreamSubscription<FileSystemEvent>

Available on File, provided by the FileScrewdriver extension

Calls block whenever the this file is modified. Returns StreamSubscription which allows to cancel the listener.

Operators

operator +(File file) → void

Available on File, provided by the FileScrewdriver extension

Allows to append content of file to this.
operator <<(String value) → void

Available on File, provided by the FileScrewdriver extension

operator that allows to append value string at the end of the file using provided UTF-8 encoding.