SyncFS - hossimo/GMA3Plugins GitHub Wiki
SyncFS() : nil
Brief:
Commit any buffers to disk. Do this before a user might unplug the device.
Paramiters:
Name |
Type |
Description |
Optional |
Returns:
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()