host.storage · function ·
DetectHostStorageFamily
Detect host storage family.
Read and write bounded application storage through the host contract.
external DetectHostStorageFamily(text declaredFamily, text osValue, text osType, bool desktopDisplayAvailable) returns textStatus: source-declared
Parameters
text declaredFamily- Supply declared family as text.
text osValue- Supply os value as text.
text osType- Supply os type as text.
bool desktopDisplayAvailable- Supply desktop display available as bool.
Use DetectHostStorageFamily
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using host.storage
// Read and write bounded application storage through the host contract.
text declaredFamily = "declared Family"
text osValue = "os Value"
text osType = "os Type"
bool desktopDisplayAvailable = true
text result = DetectHostStorageFamily(declaredFamily, osValue, osType, desktopDisplayAvailable)
Console.Log(Text.From(result))
project.mech
manifestVersion = "2"
package = "api.example.host_storage__detecthoststoragefamily"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "host.storage"
version = "0.1.0"
path = "../../../yeho/packages/host/storage"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/host/storage/storage.yh:54