-
-
Notifications
You must be signed in to change notification settings - Fork 5
SyncFS
Anthony Headley edited this page Apr 25, 2020
·
2 revisions
Commit any buffers to disk. Do this before a user might unplug the device.
Name | Type | Description | Optional |
---|
Type | Description |
---|
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()