FileMixin mixin

File mixin

Implemented types

Properties

absolute File
Returns a File instance whose path is the absolute path to this.
no setteroverride
fs FileSystem
The file system for this entity.
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
isAbsolute bool
Returns a bool indicating whether this object's path is absolute.
no setterinherited
parent Directory
The directory containing this.
no setterinherited
path String
The path of the entity.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy(String newPath) Future<File>
Copies this file.
override
create({bool recursive = false}) Future<File>
Create the file.
override
delete({bool recursive = false}) Future<FileSystemEntity>
Deletes this FileSystemEntity.
inherited
doReadAsBytes() Future<Uint8List>
Read bytes
doWriteAsBytes(List<int> bytes, {FileMode mode = FileMode.write, bool flush = false}) Future<FileMixin>
Write bytes
doWriteAsString(String contents, {FileMode mode = FileMode.write, Encoding encoding = utf8, bool flush = false}) Future<FileMixin>
Write String
exists() Future<bool>
Checks whether the file system entity with this path exists.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open({FileMode mode = FileMode.read}) Future<RandomAccessFile>
Opens the file for random access operations.
override
openRead([int? start, int? end]) Stream<Uint8List>
Creates a new independent Stream for the contents of this file.
override
openWrite({FileMode mode = FileMode.write, Encoding encoding = utf8}) FileStreamSink
Creates a new independent StreamSink for the file.
override
readAsBytes() Future<Uint8List>
Reads the entire file contents as a list of bytes.
override
readAsString({Encoding encoding = utf8}) Future<String>
Reads the entire file contents as a string using the given Encoding.
override
rename(String newPath) Future<FileSystemEntity>
Renames this file system entity.
inherited
stat() Future<FileStat>
Calls the operating system's stat() function on the path of this FileSystemEntity.
inherited
toString() String
A string representation of this object.
override
writeAsBytes(Uint8List bytes, {FileMode mode = FileMode.write, bool flush = false}) Future<File>
Writes a list of bytes to a file.
override
writeAsString(String contents, {FileMode mode = FileMode.write, Encoding encoding = utf8, bool flush = false}) Future<File>
Writes a string to a file.
override

Operators

operator ==(Object other) bool
The equality operator.
override