Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

files

Read, write and edit files in the world's virtual filesystem.

The same bytes vfs.read and vfs.write reach, with the one thing a raw VFS call cannot express: durable. While play is running, an ordinary /source write lands on the play shadow — it reads back live, but it is discarded when play exits unless someone promotes it. A durable write says these bytes are the source: it goes to canonical /source with play still running and the session still in play, hot-reloading whatever reads it, with nothing left to promote and nobody's simulation stopped.

That is why these are tools rather than a thing every caller hand-rolls: the choice between "try this" and "this is the source" is the whole decision, and it should be one argument rather than a second call to vfs.promotePlayShadow that is easy to forget.