blob: c63eac8c40358dbded3ef6560ed40222827bac2e [file] [log] [blame]
// Copyright 2018 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://wicg.github.io/native-file-system/#filesystemdirectoryhandle
[
Exposed=(Window,Worker),
SecureContext,
Serializable,
RuntimeEnabled=NativeFileSystem,
ImplementedAs=NativeFileSystemDirectoryHandle
] interface FileSystemDirectoryHandle : FileSystemHandle {
// TODO(https://crbug.com/1087157): This interface defines an async
// iterable, however that isn't supported yet by the bindings. So for now
// just explicitly define what an async iterable definition implies.
//async iterable<USVString, FileSystemHandle>;
NativeFileSystemDirectoryIterator entries();
NativeFileSystemDirectoryIterator keys();
NativeFileSystemDirectoryIterator values();
[CallWith=ScriptState] Promise<FileSystemFileHandle> getFileHandle(USVString name, optional FileSystemGetFileOptions options = {});
[CallWith=ScriptState] Promise<FileSystemDirectoryHandle> getDirectoryHandle(USVString name, optional FileSystemGetDirectoryOptions options = {});
[CallWith=ScriptState] Promise<void> removeEntry(USVString name, optional FileSystemRemoveOptions options = {});
[CallWith=ScriptState, Measure] Promise<sequence<USVString>?> resolve(FileSystemHandle possibleChild);
};