XFileInfo class
Represents a file using cross_file's XFile for cross-platform support.
This implementation works on both VM and web platforms.
- Implemented types
Constructors
Properties
- exists → bool
-
True if resource exists in the underlying storage system.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDirectory → bool
-
True for the case
TryGetDirectoryContentshas enumerated a sub-directoryno setteroverride - lastModified → DateTime
-
When the file was last modified
no setteroverride
- length → int
-
The length of the file in bytes, or -1 for a directory
or non-existing files.
no setteroverride
- mimeType → String?
-
Gets the MIME type of the file (cross-platform).
no setter
- name → String
-
The name of the file or directory, not including any path.
no setteroverride
- physicalPath → String?
-
The path to the file, including the file name. Return
null if the file is not directly accessible.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createReadStream(
) → Stream -
Return file contents as readonly stream. Caller should dispose stream
when complete.
override
-
lastModifiedAsync(
) → Future< DateTime> - Gets the last modified time asynchronously (works on all platforms).
-
lengthAsync(
) → Future< int> - Gets the file length asynchronously (works on all platforms).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readAsBytes(
) → Future< List< int> > - Reads the file as bytes (cross-platform).
-
readAsString(
) → Future< String> - Reads the file as a string (cross-platform).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited