diff --git a/files/en-us/web/api/filesystemdirectoryhandle/index.md b/files/en-us/web/api/filesystemdirectoryhandle/index.md index 1db255f77ebee00..9c4b46202135ef5 100644 --- a/files/en-us/web/api/filesystemdirectoryhandle/index.md +++ b/files/en-us/web/api/filesystemdirectoryhandle/index.md @@ -24,7 +24,7 @@ _Inherits methods from its parent, {{DOMxRef("FileSystemHandle")}}._ Regular methods: - {{domxref('FileSystemDirectoryHandle.getDirectoryHandle()')}} - - : Returns a {{jsxref('Promise')}} fulfilled with a {{domxref('FileSystemDirectoryHandle')}} for a subdirectory with the specified name within the directory handle on which the method is called. + - : Returns a {{jsxref('Promise')}} fulfilled with a `FileSystemDirectoryHandle` for a subdirectory with the specified name within the directory handle on which the method is called. - {{domxref('FileSystemDirectoryHandle.getFileHandle()')}} - : Returns a {{jsxref('Promise')}} fulfilled with a {{domxref('FileSystemFileHandle')}} for a file with the specified name, within the directory the method is called. - {{domxref('FileSystemDirectoryHandle.removeEntry()')}} diff --git a/files/en-us/web/api/filesystemhandle/index.md b/files/en-us/web/api/filesystemhandle/index.md index 2f234d368d14261..8809214d606464c 100644 --- a/files/en-us/web/api/filesystemhandle/index.md +++ b/files/en-us/web/api/filesystemhandle/index.md @@ -7,11 +7,11 @@ browser-compat: api.FileSystemHandle {{securecontext_header}}{{APIRef("File System API")}}{{AvailableInWorkers}} -The **`FileSystemHandle`** interface of the {{domxref('File System API')}} is an object which represents a file or directory entry. Multiple handles can represent the same entry. For the most part you do not work with `FileSystemHandle` directly but rather its child interfaces {{domxref('FileSystemFileHandle')}} and {{domxref('FileSystemDirectoryHandle')}}. +The **`FileSystemHandle`** interface of the {{domxref('File System API', '', '', 'nocode')}} is an object which represents a file or directory entry. Multiple handles can represent the same entry. For the most part you do not work with `FileSystemHandle` directly but rather its child interfaces {{domxref('FileSystemFileHandle')}} and {{domxref('FileSystemDirectoryHandle')}}. ## Interfaces based on FileSystemHandle -Below is a list of interfaces based on the FileSystemHandle interface. +Below is a list of interfaces based on the `FileSystemHandle` interface. - {{domxref("FileSystemFileHandle")}} {{SecureContext_Inline}} - : Represents a handle to a file entry. @@ -28,7 +28,7 @@ Below is a list of interfaces based on the FileSystemHandle interface. ## Instance methods - {{domxref('FileSystemHandle.isSameEntry()', 'isSameEntry()')}} - - : Compares two {{domxref("FileSystemHandle", "handles")}} to see if the associated entries (either a file or directory) match. + - : Compares two handles to see if the associated entries (either a file or directory) match. - {{domxref('FileSystemHandle.queryPermission()', 'queryPermission()')}} {{Experimental_Inline}} - : Queries the current permission state of the current handle. - {{domxref('FileSystemHandle.remove', 'remove()')}} {{Experimental_Inline}} {{Non-standard_Inline}} diff --git a/files/en-us/web/api/filesystemhandle/querypermission/index.md b/files/en-us/web/api/filesystemhandle/querypermission/index.md index 0241489419efad9..8b7eb2bf0ad2654 100644 --- a/files/en-us/web/api/filesystemhandle/querypermission/index.md +++ b/files/en-us/web/api/filesystemhandle/querypermission/index.md @@ -17,23 +17,24 @@ current handle. ## Syntax ```js-nolint -queryPermission(fileSystemHandlePermissionDescriptor) +queryPermission(descriptor) ``` ### Parameters -- FileSystemHandlePermissionDescriptor {{optional_inline}} +- `descriptor` {{optional_inline}} - : An object which specifies the permission mode to query for. Options are as follows: - - `'mode'`: Can be either `'read'` or - `'readwrite'`. + - `'mode'` {{optional_inline}} + + - : Can be either `'read'` or `'readwrite'`. ### Return value A {{jsxref("Promise")}} that resolves to a {{domxref("PermissionStatus")}} object. -If {{domxref('PermissionStatus.state')}} returns "prompt" the website will have to call requestPermission() before any +If {{domxref('PermissionStatus.state')}} returns "prompt" the website will have to call `requestPermission()` before any operations on the handle can be done. If this returns "denied" any operations will reject. Usually handles returned by the local file system handle factories will initially return "granted" for their read permission state. However, other than through diff --git a/files/en-us/web/api/filesystemhandle/remove/index.md b/files/en-us/web/api/filesystemhandle/remove/index.md index ee8b1c305ba48c6..cefaf227cd9d5f5 100644 --- a/files/en-us/web/api/filesystemhandle/remove/index.md +++ b/files/en-us/web/api/filesystemhandle/remove/index.md @@ -20,6 +20,7 @@ You can also call `remove()` on the root directory of the [Origin Private File S ## Syntax ```js-nolint +remove() remove(options) ``` @@ -47,7 +48,7 @@ A {{jsxref("Promise")}} that fulfills with a value of `undefined`. ## Examples -Our [FileSystemHandle.remove() demo](https://filesystemhandle-remove.glitch.me/) (see the [source code](https://glitch.com/edit/#!/filesystemhandle-remove)) is a file creator app. You can enter text into the {{htmlelement("textarea")}} and press the "Save file" {{htmlelement("button")}}, and the app will open a file picker allowing you to save that text onto your local file system in a text file of your choice. You can also choose to delete files you create. +Our [`FileSystemHandle.remove()` demo](https://filesystemhandle-remove.glitch.me/) (see the [source code](https://glitch.com/edit/#!/filesystemhandle-remove)) is a file creator app. You can enter text into the {{htmlelement("textarea")}} and press the "Save file" {{htmlelement("button")}}, and the app will open a file picker allowing you to save that text onto your local file system in a text file of your choice. You can also choose to delete files you create. It doesn't allow you to view the content of created files, and it doesn't stay in sync with the underlying file system on page reloads/closes. This means that files created by the app will still exist on the file system if you don't choose to delete them before reloading or closing the tab. @@ -83,7 +84,7 @@ Walking through this: ## Specifications -{{Specifications}} +This feature is not part of any specification, but may become standard in the future. See [_whatwg/fs#9_](https://github.com/whatwg/fs/pull/9) for the detail. ## Browser compatibility diff --git a/files/en-us/web/api/filesystemhandle/requestpermission/index.md b/files/en-us/web/api/filesystemhandle/requestpermission/index.md index 65bfb1ffd63f119..381a4b30cf2bc61 100644 --- a/files/en-us/web/api/filesystemhandle/requestpermission/index.md +++ b/files/en-us/web/api/filesystemhandle/requestpermission/index.md @@ -17,17 +17,18 @@ file handle. ## Syntax ```js-nolint -requestPermission(fileSystemHandlePermissionDescriptor) +requestPermission(descriptor) ``` ### Parameters -- FileSystemHandlePermissionDescriptor {{optional_inline}} +- `descriptor` {{optional_inline}} - : An object which specifies the permission mode to query for. Options are as follows: - - `'mode'`: Can be either `'read'` or - `'readwrite'`. + - `'mode'` {{optional_inline}} + + - : Can be either `'read'` or `'readwrite'`. ### Return value