entries-api.idl (2358B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: File and Directory Entries API (https://wicg.github.io/entries-api/) 5 6 partial interface File { 7 readonly attribute USVString webkitRelativePath; 8 }; 9 10 partial interface HTMLInputElement { 11 attribute boolean webkitdirectory; 12 readonly attribute FrozenArray<FileSystemEntry> webkitEntries; 13 }; 14 15 partial interface DataTransferItem { 16 FileSystemEntry? webkitGetAsEntry(); 17 }; 18 19 callback ErrorCallback = undefined (DOMException err); 20 21 [Exposed=Window] 22 interface FileSystemEntry { 23 readonly attribute boolean isFile; 24 readonly attribute boolean isDirectory; 25 readonly attribute USVString name; 26 readonly attribute USVString fullPath; 27 readonly attribute FileSystem filesystem; 28 29 undefined getParent(optional FileSystemEntryCallback successCallback, 30 optional ErrorCallback errorCallback); 31 }; 32 33 [Exposed=Window] 34 interface FileSystemDirectoryEntry : FileSystemEntry { 35 FileSystemDirectoryReader createReader(); 36 undefined getFile(optional USVString? path, 37 optional FileSystemFlags options = {}, 38 optional FileSystemEntryCallback successCallback, 39 optional ErrorCallback errorCallback); 40 undefined getDirectory(optional USVString? path, 41 optional FileSystemFlags options = {}, 42 optional FileSystemEntryCallback successCallback, 43 optional ErrorCallback errorCallback); 44 }; 45 46 dictionary FileSystemFlags { 47 boolean create = false; 48 boolean exclusive = false; 49 }; 50 51 callback FileSystemEntryCallback = undefined (FileSystemEntry entry); 52 53 [Exposed=Window] 54 interface FileSystemDirectoryReader { 55 undefined readEntries(FileSystemEntriesCallback successCallback, 56 optional ErrorCallback errorCallback); 57 }; 58 callback FileSystemEntriesCallback = undefined (sequence<FileSystemEntry> entries); 59 60 [Exposed=Window] 61 interface FileSystemFileEntry : FileSystemEntry { 62 undefined file(FileCallback successCallback, 63 optional ErrorCallback errorCallback); 64 }; 65 callback FileCallback = undefined (File file); 66 67 [Exposed=Window] 68 interface FileSystem { 69 readonly attribute USVString name; 70 readonly attribute FileSystemDirectoryEntry root; 71 };