diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 16f0782fce53b11..a516731630211b0 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -7422,6 +7422,8 @@ /en-US/docs/Web/API/FileRequest.onprogress /en-US/docs/Web/API/FileRequest/onprogress /en-US/docs/Web/API/FileSystemFileEntry/FileSystemFileEntry.createWriter /en-US/docs/Web/API/FileSystemFileEntry/createWriter /en-US/docs/Web/API/FileSystemFileEntry/FileSystemFileEntry.createWriter() /en-US/docs/Web/API/FileSystemFileEntry/createWriter +/en-US/docs/Web/API/FileSystemFlags/create /en-US/docs/Web/API/FileSystemFlags +/en-US/docs/Web/API/FileSystemFlags/exclusive /en-US/docs/Web/API/FileSystemFlags /en-US/docs/Web/API/File_System_API /en-US/docs/Web/API/File_and_Directory_Entries_API /en-US/docs/Web/API/File_System_API/Introduction /en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction /en-US/docs/Web/API/Float32Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 4d7a592d88ebda9..0049027edb01061 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -46053,22 +46053,6 @@ "Sheppy" ] }, - "Web/API/FileSystemFlags/create": { - "modified": "2020-10-15T21:49:31.156Z", - "contributors": [ - "sideshowbarker", - "fscholz", - "Sheppy" - ] - }, - "Web/API/FileSystemFlags/exclusive": { - "modified": "2020-10-15T21:49:29.974Z", - "contributors": [ - "sideshowbarker", - "fscholz", - "Sheppy" - ] - }, "Web/API/FileSystemHandle": { "modified": "2020-12-12T11:21:27.430Z", "contributors": [ diff --git a/files/en-us/web/api/filesystemflags/create/index.md b/files/en-us/web/api/filesystemflags/create/index.md deleted file mode 100644 index 8e03b9f9b10e5b9..000000000000000 --- a/files/en-us/web/api/filesystemflags/create/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: FileSystemFlags.create -slug: Web/API/FileSystemFlags/create -tags: - - API - - Create - - File and Directory Entries API - - FileSystemFlags - - Files - - File System API - - Offline - - Property - - Reference -browser-compat: api.FileSystemFlags.create ---- -{{APIRef("File and Directory Entries API")}} - -The **`create`** property on the {{domxref("FileSystemFlags")}} -dictionary is used to indicate whether or not the file should be created if it's -missing. `FileSystemFlags` is only used when calling -{{domxref("FileSystemDirectoryEntry.getFile()")}} or -{{domxref("FileSystemDirectoryEntry.getDirectory()")}}. - -## Syntax - -```js -fileSystemFlags.create = booleanValue -``` - -### Values - -{{page("/en-US/docs/Web/API/FileSystemFlags", "Values and results")}} - -## Specifications - -| Specification | Status | Comment | -| ------------------------------------ | -------------------------------- | --------------- | -| {{SpecName('File System API', '#dom-filesystemflags-create')}} | {{Spec2('File System API')}} | | - -## See also - -- [File and Directory - Entries API](/en-US/docs/Web/API/File_and_Directory_Entries_API) -- [Introduction - to the File System API](/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction) -- {{domxref("FileSystemFlags")}} -- {{domxref("FileSystemDirectoryEntry.getFile()")}} and - {{domxref("FileSystemDirectoryEntry.getDirectory()")}} diff --git a/files/en-us/web/api/filesystemflags/exclusive/index.md b/files/en-us/web/api/filesystemflags/exclusive/index.md deleted file mode 100644 index 5e93e5cdf7b4a1e..000000000000000 --- a/files/en-us/web/api/filesystemflags/exclusive/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: FileSystemFlags.exclusive -slug: Web/API/FileSystemFlags/exclusive -tags: - - API - - File and Directory Entries API - - FileSystemFlags - - Files - - Offline - - Property - - Reference - - exclusive -browser-compat: api.FileSystemFlags.exclusive ---- -{{APIRef("File and Directory Entries API")}} - -The **`exclusive`** property on the -{{domxref("FileSystemFlags")}} dictionary is used in tandem with the create property to -determine whether or not it's acceptable to require that the file not already exist when -the reference to it is created by calling -{{domxref("FileSystemDirectoryEntry.getFile()")}} or -{{domxref("FileSystemDirectoryEntry.getDirectory()")}}. - -## Syntax - -```js -fileSystemFlags.exclusive = booleanValue -``` - -### Values - -{{page("/en-US/docs/Web/API/FileSystemFlags", "Values and results")}} - -## Specifications - -| Specification | Status | Comment | -| ------------------------------------ | -------------------------------- | --------------- | -| {{SpecName('File System API', '#dom-filesystemflags-exclusive')}} | {{Spec2('File System API')}} | | - -## See also - -- [File and Directory - Entries API](/en-US/docs/Web/API/File_and_Directory_Entries_API) -- [Introduction - to the File System API](/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction) -- {{domxref("FileSystemFlags")}} -- {{domxref("FileSystemDirectoryEntry.getFile()")}} and - {{domxref("FileSystemDirectoryEntry.getDirectory()")}} diff --git a/files/en-us/web/api/filesystemflags/index.md b/files/en-us/web/api/filesystemflags/index.md index ab88a32bfe93a38..fc335527e714c75 100644 --- a/files/en-us/web/api/filesystemflags/index.md +++ b/files/en-us/web/api/filesystemflags/index.md @@ -13,7 +13,8 @@ browser-compat: api.FileSystemFlags --- {{APIRef("File and Directory Entries API")}} -The **`FileSystemFlags`** dictionary defines a set of values which are used when specifying option flags when calling certain methods in the [File and Directory Entries API](/en-US/docs/Web/API/File_and_Directory_Entries_API). Methods which accept an options parameter of this type may specify zero or more of these flags as fields in an object, like this: +The **`FileSystemFlags`** dictionary defines a set of values which are used when specifying option flags when calling certain methods in the [File and Directory Entries API](/en-US/docs/Web/API/File_and_Directory_Entries_API). +Methods which accept an options parameter of this type may specify zero or more of these flags as fields in an object, like this: ```js dataDirectoryEntry.getDirectory("Workspace", { create: true }, function(entry) { @@ -26,10 +27,14 @@ Here, we see that the `create` property is provided, with a value of `true`, ind ## Properties -- {{domxref("FileSystemFlags.create", "create")}} {{optional_inline}} - - : If this property is `true`, and the requested file or directory doesn't exist, the user agent should create it. The default is `false`. The parent directory must already exist. -- {{domxref("FileSystemFlags.exclusive", "exclusive")}} {{optional_inline}} - - : If `true`, and the `create` option is also `true`, the file must not exist prior to issuing the call. Instead, it must be possible for it to be created newly at call time. The default is `false`. +- `create` {{optional_inline}} + - : If this property is `true`, and the requested file or directory doesn't exist, the user agent should create it. + The default is `false`. + The parent directory must already exist. +- `exclusive` {{optional_inline}} + - : If `true`, and the `create` option is also `true`, the file must not exist prior to issuing the call. + Instead, it must be possible for it to be created newly at call time. + The default is `false`. ### Values and results @@ -45,12 +50,8 @@ Note that, when `create` is `false`, the value of `exclusive` is irrelevant and Result - - {{domxref("FileSystemFlags.create", "create")}} - - - {{domxref("FileSystemFlags.exclusive", "exclusive")}} - + create + exclusive @@ -58,15 +59,12 @@ Note that, when `create` is `false`, the value of `exclusive` is irrelevant and false n/a - Path exists and matches the desired type (depending on whether the - function called is getFile() or getDirectory() + Path exists and matches the desired type (depending on whether the function called is getFile() or getDirectory() The successCallback is called with a - {{domxref("FileSystemFileEntry")}} if - getFile() was called or a - {{domxref("FileSystemDirectoryEntry")}} if - getDirectory() was called. + {{domxref("FileSystemFileEntry")}} if getFile() was called or a + {{domxref("FileSystemDirectoryEntry")}} if getDirectory() was called. @@ -74,8 +72,7 @@ Note that, when `create` is `false`, the value of `exclusive` is irrelevant and n/a Path exists but doesn't match the desired type - The errorCallback is called with an appropriate error code - (if the callback was provided). + The errorCallback is called with an appropriate error code (if the callback was provided). @@ -85,8 +82,7 @@ Note that, when `create` is `false`, the value of `exclusive` is irrelevant and The existing file or directory is removed and replaced with a new one, then the successCallback is called with a - {{domxref("FileSystemFileEntry")}} or a - {{domxref("FileSystemDirectoryEntry")}}, as appropriate. + {{domxref("FileSystemFileEntry")}} or a {{domxref("FileSystemDirectoryEntry")}}, as appropriate. @@ -94,8 +90,7 @@ Note that, when `create` is `false`, the value of `exclusive` is irrelevant and false Path doesn't exist - The file or directory is created, then a - {{domxref("FileSystemFileEntry")}} or a + The file or directory is created, then a {{domxref("FileSystemFileEntry")}} or a {{domxref("FileSystemDirectoryEntry")}} is passed to the successCallback, as appropriate. @@ -114,10 +109,8 @@ Note that, when `create` is `false`, the value of `exclusive` is irrelevant and true Path doesn't exist - The file or directory is created, then a - {{domxref("FileSystemFileEntry")}} or a - {{domxref("FileSystemDirectoryEntry")}} is passed to the - successCallback, as appropriate. + The file or directory is created, then a {{domxref("FileSystemFileEntry")}} or a + {{domxref("FileSystemDirectoryEntry")}} is passed to the successCallback, as appropriate. @@ -125,9 +118,11 @@ Note that, when `create` is `false`, the value of `exclusive` is irrelevant and ## Specifications -| Specification | Status | Comment | -| ------------------------------------ | -------------------------------- | --------------- | -| {{SpecName('File System API', '#dictdef-filesystemflags')}} | {{Spec2('File System API')}} | | +{{Specifications}} + +## Browser compatibility + +{{Compat}} ## See also