Skip to content

TemporaryVault.populate method

TemporaryVault › populate

Writes files and folders into the vault directory **on the host**. Parent directories are created automatically.

- string values are written as UTF-8 text files. - Uint8Array values (including Buffer) are written as binary files. - Paths ending with / are treated as empty folders (value must be undefined).

The write is always host-local — TemporaryVault.path is a host path, and on a mobile transport the vault the app opens lives on the device instead. TemporaryVault.register carries the directory across before it registers, so populate-then-register is all a caller needs; TemporaryVault.syncToDevice is the seam that does the carrying.

Signature:

populate(files: PopulateFilesParams): void

Parameters:

ParameterTypeDescription
filesPopulateFilesParamsMap of file/folder paths to content.

Returns: void