flush method

void flush()

@AvailableInWorkers("dedicated")

The flush() method of the FileSystemSyncAccessHandle interface persists any changes made to the file associated with the handle via the FileSystemSyncAccessHandle.write method to disk.

Bear in mind that you only need to call this method if you need the changes committed to disk at a specific time, otherwise you can leave the underlying operating system to handle this when it sees fit, which should be OK in most cases.

Note: In earlier versions of the spec, FileSystemSyncAccessHandle.close, flush(), FileSystemSyncAccessHandle.getSize, and FileSystemSyncAccessHandle.truncate were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods.

Implementation

external void flush();