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 whetherthis
file is empty or not.no setter - isEmptySync → bool
-
Available on File, provided by the FileScrewdriver extension
Returns true ifthis
file is emptyno setter
Methods
-
appendBytes(
List< int> value) → Future<void> -
Available on File, provided by the FileScrewdriver extension
Appendsvalue
bytes at the end of the file. -
appendBytesSync(
List< int> value) → Future<void> -
Available on File, provided by the FileScrewdriver extension
Appendsvalue
bytes at the end of the file. -
appendFrom(
File file) → Future< void> -
Available on File, provided by the FileScrewdriver extension
Appends content offile
at the end ofthis
file. -
appendFromSync(
File file) → void -
Available on File, provided by the FileScrewdriver extension
Appends content offile
at the end ofthis
file. -
appendString(
String value, {Encoding encoding = utf8}) → Future< void> -
Available on File, provided by the FileScrewdriver extension
Appendsvalue
string at the end of the file using providedencoding
. -
appendStringLine(
String value, {Encoding encoding = utf8}) → Future< void> -
Available on File, provided by the FileScrewdriver extension
Appendsvalue
string as a new line at the end of the file using providedencoding
. -
appendStringSync(
String value, {Encoding encoding = utf8}) → void -
Available on File, provided by the FileScrewdriver extension
Appendsvalue
string at the end of the file using providedencoding
. -
clear(
{bool flush = false}) → Future< void> -
Available on File, provided by the FileScrewdriver extension
Asynchronously flushes all the data inthis
file leaving it to be empty. -
clearSync(
{bool flush = false}) → void -
Available on File, provided by the FileScrewdriver extension
Synchronously flushes all the data inthis
file leaving it to be empty. -
copyTo(
File other) → Future< void> -
Available on File, provided by the FileScrewdriver extension
Copies content ofthis
toother
file. -
copyToSync(
File other) → void -
Available on File, provided by the FileScrewdriver extension
Copies content ofthis
toother
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 orthis
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
Callsblock
whenever thethis
file is deleted. Returns StreamSubscription which allows to cancel the listener. -
onModified(
void block()) → StreamSubscription< FileSystemEvent> -
Available on File, provided by the FileScrewdriver extension
Callsblock
whenever thethis
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 offile
tothis
. -
operator <<(
String value) → void -
Available on File, provided by the FileScrewdriver extension
operator that allows to appendvalue
string at the end of the file using provided UTF-8 encoding.