FileSystemWritableFileStream.seek()

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The seek() method of the FileSystemWritableFileStream interface updates the current file cursor offset to the position (in bytes) specified when calling the method.

Syntax

FileSystemWritableStream.seek(position).then(...);

Parameters

position

An unsigned long describing the byte position from the top (beginning) of the file.

Return value

Promise which returns undefined.

Exceptions

NotAllowedError

If the PermissionStatus.state is not 'granted'.

TypeError

If position is not defined or of type unsigned long.

Examples

Todo

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
seek
86
86
No
No
No
No
No
No
No
No
No
No

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/seek