summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/native_io/native_io_file_sync.idl
blob: 4f47c992ad18d0a9ec8186a3fa7895532686506e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://github.com/fivedots/nativeio-explainer

[
  Exposed=DedicatedWorker,
  RuntimeEnabled=StorageFoundationAPI,
  SecureContext
] interface NativeIOFileSync {
  void close();

  [
    RaisesException
  ] unsigned long long getLength();

  [
    RaisesException
  ] void setLength(unsigned long long length);

  [
    RaisesException, MeasureAs=StorageFoundationReadSync
  ] unsigned long long read([AllowShared] ArrayBufferView buffer,
                            unsigned long long file_offset);
  [
    RaisesException, MeasureAs=StorageFoundationWriteSync
  ] unsigned long long write([AllowShared] ArrayBufferView buffer,
                             unsigned long long file_offset);
  [
    RaisesException, MeasureAs=StorageFoundationFlushSync
  ] void flush();
};