| // 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/writable-files/#filesystemhandle |
| [ |
| RuntimeEnabled=WritableFiles, |
| NoInterfaceObject |
| ] interface FileSystemBaseHandle { |
| // Brand checking APIs because javascript makes it otherwise really hard to |
| // figure out what type an object is when you don't know in which global |
| // (i.e. iframe) the object was created. |
| readonly attribute boolean isFile; |
| readonly attribute boolean isDirectory; |
| |
| readonly attribute USVString name; |
| |
| [CallWith=ScriptState] Promise<FileSystemDirectoryHandle> getParent(); |
| |
| [CallWith=ScriptState] Promise<FileSystemBaseHandle> moveTo( |
| FileSystemDirectoryHandle parent, optional USVString name); |
| [CallWith=ScriptState] Promise<FileSystemBaseHandle> copyTo( |
| FileSystemDirectoryHandle parent, optional USVString name); |
| [CallWith=ScriptState] Promise<void> remove(); |
| }; |