このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

FileSystemWritableFileStream.seek()

Baseline 2025
Newly available

Since ⁨September 2025⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

FileSystemWritableFileStream インターフェイスの seek() メソッドを呼ぶと、現在のファイルカーソルオフセットを (バイト単位の) 指定の位置に移動します。

構文

js
seek(position)

引数

position

ファイルの top (最初) からのバイト単位の位置を表す unsigned long 値です。

返値

undefined で解決する Promise を返します。

例外

NotAllowedError DOMException

PermissionStatus.state'granted' でないとき返されます。

TypeError

position が定義されていないか、unsigned long 型でないとき返されます。

未稿

仕様書

Specification
File System
# api-filesystemwritablefilestream-seek

ブラウザーの互換性

関連情報