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() Future<void>

Available on File, provided by the FileScrewdriver extension

Asynchronously flushes all the data in this file leaving it to be empty.
clearSync() → 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.
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.