pocketenv/volume
Manage persistent volumes mounted in a sandbox.
Volumes provide durable storage that survives sandbox restarts.
Types
Values
pub fn create(
sb: sandbox.ConnectedSandbox,
name: String,
path: String,
) -> Result(Nil, pocketenv.PocketenvError)
Creates a volume named name mounted at path.
Example
let assert Ok(Nil) = sb |> volume.create("data", "/mnt/data")
pub fn delete(
sb: sandbox.ConnectedSandbox,
id: String,
) -> Result(Nil, pocketenv.PocketenvError)
Deletes the volume identified by id.
pub fn list(
sb: sandbox.ConnectedSandbox,
) -> Result(List(Volume), pocketenv.PocketenvError)
Lists all volumes attached to the sandbox.
Example
let assert Ok(vols) = sb |> volume.list()