tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file-system-access.idl (2073B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: File System Access (https://wicg.github.io/file-system-access/)
      5 
      6 enum FileSystemPermissionMode {
      7  "read",
      8  "readwrite"
      9 };
     10 
     11 dictionary FileSystemPermissionDescriptor : PermissionDescriptor {
     12  required FileSystemHandle handle;
     13  FileSystemPermissionMode mode = "read";
     14 };
     15 
     16 dictionary FileSystemHandlePermissionDescriptor {
     17  FileSystemPermissionMode mode = "read";
     18 };
     19 
     20 [Exposed=(Window,Worker), SecureContext, Serializable]
     21 partial interface FileSystemHandle {
     22  Promise<PermissionState> queryPermission(optional FileSystemHandlePermissionDescriptor descriptor = {});
     23  Promise<PermissionState> requestPermission(optional FileSystemHandlePermissionDescriptor descriptor = {});
     24 };
     25 
     26 enum WellKnownDirectory {
     27  "desktop",
     28  "documents",
     29  "downloads",
     30  "music",
     31  "pictures",
     32  "videos",
     33 };
     34 
     35 typedef (WellKnownDirectory or FileSystemHandle) StartInDirectory;
     36 
     37 dictionary FilePickerAcceptType {
     38    USVString description = "";
     39    record<USVString, (USVString or sequence<USVString>)> accept;
     40 };
     41 
     42 dictionary FilePickerOptions {
     43    sequence<FilePickerAcceptType> types;
     44    boolean excludeAcceptAllOption = false;
     45    DOMString id;
     46    StartInDirectory startIn;
     47 };
     48 
     49 dictionary OpenFilePickerOptions : FilePickerOptions {
     50    boolean multiple = false;
     51 };
     52 
     53 dictionary SaveFilePickerOptions : FilePickerOptions {
     54    USVString? suggestedName;
     55 };
     56 
     57 dictionary DirectoryPickerOptions {
     58    DOMString id;
     59    StartInDirectory startIn;
     60    FileSystemPermissionMode mode = "read";
     61 };
     62 
     63 [SecureContext]
     64 partial interface Window {
     65    Promise<sequence<FileSystemFileHandle>> showOpenFilePicker(optional OpenFilePickerOptions options = {});
     66    Promise<FileSystemFileHandle> showSaveFilePicker(optional SaveFilePickerOptions options = {});
     67    Promise<FileSystemDirectoryHandle> showDirectoryPicker(optional DirectoryPickerOptions options = {});
     68 };
     69 
     70 partial interface DataTransferItem {
     71    Promise<FileSystemHandle?> getAsFileSystemHandle();
     72 };