Skip to content
Anthony Headley edited this page Apr 25, 2020 · 2 revisions

SyncFS() : nil

Brief:

Commit any buffers to disk. Do this before a user might unplug the device.

Paramiters:

Name Type Description Optional

Returns:

Type Description

Examples:

local drive = Root().Temp.DriveCollect[2] --assuming a USB disk is plugged into slot 2
local sep = GetPathSeparator()
local exportPath = GetPathOverrideFor("export", drive.path) .. sep .. "export.json"
local data = {"one","two","three"}

ExportJson(exportPath, data)
-- sync the files to disk when done and before your user unplugs the device
SyncFS()
Clone this wiki locally