RunAnywhereStorage class
Static helpers for storage + low-level download + model registration.
Mirrors Swift RunAnywhere+Storage.swift — every public method in the
Swift extension has a corresponding entry point here.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
cleanTempFiles(
) → Future< void> -
Clear the SDK's Temp directory. Mirrors Swift's
cleanTempFiles(). -
deleteModel(
String modelId) → Future< StorageDeleteResult> -
Delete one downloaded model end-to-end: unload it if loaded, remove its
files through the platform adapter, and clear its registry path so the
entry returns to registered-not-downloaded (re-downloadable).
Convenience over deleteStorage with the canonical flag set — mirrors
Swift
RunAnywhere.deleteModel(_:). -
deleteStorage(
StorageDeleteRequest request) → Future< StorageDeleteResult> - Execute a generated-proto storage delete request.
-
importModel(
ModelImportRequest request) → Future< ModelImportResult> - Import a stable, platform-normalized local model path into the generated registry. Also the public local-import entry point for file-picker / bookmark flows after the platform has handled sandbox access.
-
registerArchiveModel(
{required String archiveUrl, required ArchiveStructure structure, String? id, required String name, required InferenceFramework framework, ModelCategory modality = ModelCategory.MODEL_CATEGORY_LANGUAGE, ArchiveType? archiveType, int? memoryRequirement, bool supportsThinking = false, bool supportsLora = false}) → Future< ModelInfo> - Register an archive-packaged model (tar.gz / tar.bz2 / tar.xz / zip) where the caller needs to specify the on-disk layout (ArchiveStructure.ARCHIVE_STRUCTURE_DIRECTORY_BASED, ArchiveStructure.ARCHIVE_STRUCTURE_NESTED_DIRECTORY, etc.) the URL-form registerModel cannot infer.
-
registerModel(
{String? id, required String name, required String url, required InferenceFramework framework, ModelCategory modality = ModelCategory.MODEL_CATEGORY_LANGUAGE, ModelArtifactType? artifactType, int? memoryRequirement, bool supportsThinking = false, bool supportsLora = false}) → Future< ModelInfo> -
Register a remote model with the in-memory model registry from a
download URL. Delegates the full build-and-save flow to the commons
single-call factory
rac_register_model_from_url_proto, which derives the canonical id from the URL (rac_model_generate_id), defaults format/framework/category/context-length, infers the artifact type from the URL extension (archive vs single-file), overlays the caller-supplied capability fields, and persists through the registry save path. -
registerMultiFileModel(
{required List< ModelFileDescriptor> files, required String id, required String name, required InferenceFramework framework, ModelCategory modality = ModelCategory.MODEL_CATEGORY_LANGUAGE, int? memoryRequirement, int? contextLength, bool supportsThinking = false, ModelSource source = ModelSource.MODEL_SOURCE_REMOTE}) → Future<ModelInfo> -
Register a multi-file model (e.g., VLMs with a separate
mmproj, MiniLM embedding withvocab.txt) through the canonical commons factory (rac_register_multi_file_model_proto) — no URL is involved at the model level because each ModelFileDescriptor carries its own URL.