File class

Implemented types

Constructors

File(String path)
File.fromUri(Uri uri)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
parent Directory
no setteroverride
path String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
no setteroverride

Methods

copy(String newPath) Future<File>
copySync(String newPath) File
create({bool recursive = false, bool exclusive = false}) Future<File>
createSync({bool recursive = false, bool exclusive = false}) → void
delete({bool recursive = false}) Future<FileSystemEntity>
override
deleteSync({bool recursive = false}) → void
exists() Future<bool>
override
existsSync() bool
override
lastModified() Future<DateTime>
lastModifiedSync() DateTime
length() Future<int>
lengthSync() int
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open({FileMode mode = FileMode.read}) Future<RandomAccessFile>
openRead([int? start, int? end]) Stream<List<int>>
openSync({FileMode mode = FileMode.read}) RandomAccessFile
openWrite({FileMode mode = FileMode.write, Encoding encoding = utf8}) IOSink
readAsBytes() Future<Uint8List>
readAsBytesSync() Uint8List
readAsLines({Encoding encoding = utf8}) Future<List<String>>
readAsLinesSync({Encoding encoding = utf8}) List<String>
readAsString({Encoding encoding = utf8}) Future<String>
readAsStringSync({Encoding encoding = utf8}) String
rename(String newPath) Future<File>
override
renameSync(String newPath) File
override
resolveSymbolicLinksSync() String
override
stat() Future<FileStat>
override
statSync() FileStat
override
toString() String
A string representation of this object.
override
watch({int events = FileSystemEvent.all, bool recursive = false}) Stream<FileSystemEvent>
override
writeAsBytes(List<int> bytes, {FileMode mode = FileMode.write, bool flush = false}) Future<File>
writeAsBytesSync(List<int> bytes, {FileMode mode = FileMode.write, bool flush = false}) → void
writeAsString(String contents, {FileMode mode = FileMode.write, Encoding encoding = utf8, bool flush = false}) Future<File>
writeAsStringSync(String contents, {FileMode mode = FileMode.write, Encoding encoding = utf8, bool flush = false}) → void

Operators

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