Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

files.write

Write a file into the world's virtual filesystem.

durable is the argument that matters. 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. durable = true says these bytes are the source: the write goes to canonical /source with play still running, hot-reloading whatever reads it, with nothing left to promote and nobody's simulation stopped. In edit mode the two are the same thing.

Writing a folder asset's entry file (Foo.module/init.luau) also creates the files that asset type requires, so the asset exists rather than a lone file wearing its name.