Blob class

Constructors

Blob({String? data, bool? dir, List<String> entries = const [], String? path})
Returns a new Blob instance.

Properties

data ↔ String?
Data is the file's bytes, verbatim, base64 on the wire. Empty for a directory and for an empty file alike; Dir is what tells those apart.
getter/setter pair
dir ↔ bool?
Dir says which of the two answers this is: true and the path is a directory, so read Entries; false and it is a file, so read Data. Nothing else distinguishes them — an empty file and an empty directory look alike here.
getter/setter pair
entries ↔ List<String>
Entries is a directory's contents as bare NAMES, not paths — one level, no recursion, dotfiles included, "." and ".." excluded (ls -1A). Empty for a file, and for an empty directory.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
path ↔ String?
Path is the RESOLVED absolute path that was read — the caller's relative path joined onto the sandbox's working directory (Leased.Workdir), so it names the same file for a reader who does not know the class.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Blob?
Returns a new Blob instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Blob>
mapFromJson(dynamic json) → Map<String, Blob>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Blob>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.