1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 enum WriteCommandType {
12 [GenerateConversionToJS]
13 dictionary WriteParams {
14 required WriteCommandType type;
15 unsigned long long? size;
16 unsigned long long? position;
17 (BufferSource or Blob or UTF8String)? data;
20 typedef (BufferSource or Blob or UTF8String or WriteParams) FileSystemWriteChunkType;
22 [Exposed=(Window,Worker), SecureContext, Pref="dom.fs.enabled"]
23 interface FileSystemWritableFileStream : WritableStream {
25 Promise<undefined> write(FileSystemWriteChunkType data);
27 Promise<undefined> seek(unsigned long long position);
29 Promise<undefined> truncate(unsigned long long size);