ForwardingFile class Null safety

A file that forwards all methods and properties to a delegate.

Implemented types

Constructors

ForwardingFile()

Properties

absolute File
A FileSystemEntity whose path is the absolute path of path.
read-onlyinherited
basename String
Gets the part of this entity's path after the last separator.
read-onlyinherited
delegate File
The entity to which this entity will forward all methods and properties.
protected">@protectedread-onlyinherited
dirname String
Gets the part of this entity's path before the last separator.
read-onlyinherited
fileSystem FileSystem
Returns the file system responsible for this entity.
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
isAbsolute bool
Whether this object's path is absolute.
read-onlyinherited
parent Directory
The parent directory of this entity.
read-onlyinherited
path String
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
uri Uri
A Uri representing the file system entity's location.
read-onlyinherited

Methods

copy(String newPath) Future<File>
Copies this file.
override
copySync(String newPath) File
Synchronously copies this file.
override
create({bool recursive = false}) Future<File>
Creates the file.
override
createSync({bool recursive = false}) → void
Synchronously creates the file.
override
delete({bool recursive = false}) Future<File>
Deletes this FileSystemEntity.
inherited
deleteSync({bool recursive = false}) → void
Synchronously deletes this FileSystemEntity.
inherited
exists() Future<bool>
Checks whether the file system entity with this path exists.
inherited
existsSync() bool
Synchronously checks whether the file system entity with this path exists.
inherited
lastAccessed() Future<DateTime>
The last-accessed time of the file.
override
lastAccessedSync() DateTime
The last-accessed time of the file.
override
lastModified() Future<DateTime>
Get the last-modified time of the file.
override
lastModifiedSync() DateTime
Get the last-modified time of the file.
override
length() Future<int>
The length of the file.
override
lengthSync() int
The length of the file provided synchronously.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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<List<int>>
Creates a new independent Stream for the contents of this file.
override
openSync({FileMode mode = FileMode.read}) RandomAccessFile
Synchronously opens the file for random access operations.
override
openWrite({FileMode mode = FileMode.write, Encoding encoding = utf8}) IOSink
Creates a new independent IOSink for the file.
override
readAsBytes() Future<Uint8List>
Reads the entire file contents as a list of bytes.
override
readAsBytesSync() Uint8List
Synchronously reads the entire file contents as a list of bytes.
override
readAsLines({Encoding encoding = utf8}) Future<List<String>>
Reads the entire file contents as lines of text using the given Encoding.
override
readAsLinesSync({Encoding encoding = utf8}) List<String>
Synchronously reads the entire file contents as lines of text using the given Encoding.
override
readAsString({Encoding encoding = utf8}) Future<String>
Reads the entire file contents as a string using the given Encoding.
override
readAsStringSync({Encoding encoding = utf8}) String
Synchronously reads the entire file contents as a string using the given Encoding.
override
rename(String newPath) Future<File>
Renames this file system entity.
inherited
renameSync(String newPath) File
Synchronously renames this file system entity.
inherited
Resolves the path of a file system object relative to the current working directory.
inherited
resolveSymbolicLinksSync() String
Resolves the path of a file system object relative to the current working directory.
inherited
setLastAccessed(DateTime time) Future
Modifies the time the file was last accessed.
override
setLastAccessedSync(DateTime time) → void
Synchronously modifies the time the file was last accessed.
override
setLastModified(DateTime time) Future
Modifies the time the file was last modified.
override
setLastModifiedSync(DateTime time) → void
Synchronously modifies the time the file was last modified.
override
stat() Future<FileStat>
Calls the operating system's stat() function on path.
inherited
statSync() FileStat
Synchronously calls the operating system's stat() function on path.
inherited
toString() String
A string representation of this object.
inherited
watch({int events = FileSystemEvent.all, bool recursive = false}) Stream<FileSystemEvent>
Start watching the FileSystemEntity for changes.
inherited
wrap(File delegate) ForwardingFile
Creates a new entity with the same file system and same type as this entity but backed by the specified delegate.
override
wrapDirectory(Directory delegate) Directory
Creates a new directory with the same file system as this entity and backed by the specified delegate.
protected">@protectedinherited
wrapFile(File delegate) File
Creates a new file with the same file system as this entity and backed by the specified delegate.
protected">@protectedinherited
Creates a new link with the same file system as this entity and backed by the specified delegate.
protected">@protectedinherited
writeAsBytes(List<int> bytes, {FileMode mode = FileMode.write, bool flush = false}) Future<File>
Writes a list of bytes to a file.
override
writeAsBytesSync(List<int> bytes, {FileMode mode = FileMode.write, bool flush = false}) → void
Synchronously 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
writeAsStringSync(String contents, {FileMode mode = FileMode.write, Encoding encoding = utf8, bool flush = false}) → void
Synchronously writes a string to a file.
override

Operators

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