// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://fs.spec.whatwg.org/#api-filesystemsyncaccesshandle
[
Exposed=DedicatedWorker,
SecureContext
] interface FileSystemSyncAccessHandle {
[RuntimeEnabled=FileSystemAccessLockingScheme] readonly attribute USVString mode;
[Measure] void close();
[RaisesException, Measure] void flush();
[RaisesException, Measure] unsigned long long getSize();
[
RaisesException, Measure
] void truncate([EnforceRange] unsigned long long size);
[
RaisesException, Measure
] unsigned long long read(AllowSharedBufferSource buffer,
optional FileSystemReadWriteOptions options = {});
[
RaisesException, Measure
] unsigned long long write(AllowSharedBufferSource buffer,
optional FileSystemReadWriteOptions options = {});
};