FileSource class

A source that represents a file.

Inheritance

Constructors

FileSource(File file, [Uri? uri])
Initialize a newly created source object to represent the given file. If a uri is given, then it will be used as the URI from which the source was derived, otherwise a file: URI will be created based on the file.

Properties

contents → TimestampedData<String>
Get the contents and timestamp of this source.
no setteroverride
contentsFromFile → TimestampedData<String>
Get and return the contents and timestamp of the underlying file.
no setter
file File
The file represented by this source.
final
fullName String
Return the full (long) version of the name that can be displayed to the user to denote this source. For example, for a source representing a file this would typically be the absolute path of the file.
no setteroverride
hashCode int
Return a hash code for this source.
no setteroverride
id int
The unique ID associated with this source.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortName String
Return a short version of the name that can be displayed to the user to denote this source. For example, for a source representing a file this would typically be the name of the file.
no setteroverride
uri Uri
The URI from which this source was originally derived.
final

Methods

exists() bool
Return true if this source exists.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
Return true if the given object is a source that represents the same source code as this source.
override