A reference to a data resource.
- Inheritance
- Implementers
- Annotations
Constructors
- XFile.fileSystem({required String path})
-
Instantiates a FileSystemXFile as a reference to a local data resource
on the file system.
factory
- XFile.scopedStorage({required String uri})
-
Instantiates a ScopedStorageXFile as a reference to a local data
resource within a device's scoped storage.
factory
Properties
Methods
-
exists(
) → Future< bool> -
Whether the resource represented by this reference exists.
inherited
-
getExtension<
S extends PlatformXEntityExtension> () → S? -
Attempt to provide the platform class extension.
inherited
-
lastModified(
) → Future< DateTime?> - Date and time when the resource was last modified, if the information is available.
-
length(
) → Future< int?> - The length of the data represented by this uri, in bytes.
-
name(
) → Future< String?> - The name of the resource represented by this object or null if the file doesn't exist or information is not available.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openRead(
[int? start, int? end]) → Stream< Uint8List> - Creates a new independent Stream for the contents of this resource.
-
readAsBytes(
) → Future< Uint8List> - Reads the entire resource contents as a list of bytes.
-
readAsString(
{Encoding encoding = utf8}) → Future< String> - Reads the entire resource contents as a string using the given Encoding.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited