ResolvedHfFile class
One file of a multi-file (directory) model resolved from a Hugging Face
repo — e.g. an ORT-GenAI model is a DIRECTORY (genai_config.json +
model.onnx+`model.onnx_data` + tokenizer files), not a single file.
name is the BARE leaf filename as it must appear inside the installed
model directory (ORT-GenAI's genai_config.json references its siblings by
bare name, and the native loader is handed the directory). It MUST be a
single path segment — no path separators and no ./.. — or the installer
rejects it (a ../… name would otherwise escape the model directory). url
is the pinned download URL. sha256/sizeBytes are advisory (carried, not
yet verified — see ResolvedHfModel.sha256).
Constructors
- ResolvedHfFile({required String name, required String url, String? sha256, int? sizeBytes})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBareLeafName → bool
-
Whether name is a safe BARE leaf — a single path segment with no
separators and no
./... The installer refuses a directory member whose name is not (a../…name would escape the model directory). The rule lives here so resolvers and the installer share one definition.no setter - name → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sha256 → String?
-
final
- sizeBytes → int?
-
final
- url → String
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited