FileSystemSyncAccessHandle

The FileSystemSyncAccessHandle interface of the File System API represents a synchronous handle to a file system entry. Available only in secure contexts.

MDN Reference

Functions

Link copied to clipboard
fun close()

The close() method of the ``js-nolint close() `` None.

Link copied to clipboard
fun flush()

The flush() method of the 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.

Link copied to clipboard

The getSize() method of the ``js-nolint getSize() `` None.

Link copied to clipboard
fun read(buffer: AllowSharedBufferSource, options: FileSystemReadWriteOptions = definedExternally): UInt53

The read() method of the ``js-nolint read(buffer, options) `` - buffer - : An ArrayBuffer or ArrayBufferView (such as a DataView) representing the buffer that the file content should be read into.

Link copied to clipboard
fun truncate(newSize: UInt53)

The truncate() method of the ``js-nolint truncate(newSize) `` - newSize - : The number of bytes to resize the file to.

Link copied to clipboard
fun write(buffer: AllowSharedBufferSource, options: FileSystemReadWriteOptions = definedExternally): UInt53

The write() method of the Files within the origin private file system are not visible to end-users, therefore are not subject to the same security checks as methods running on files within the user-visible file system.