As explained in https://github.com/WICG/writable-files/blob/master/EXPLAINER.md, implement a more modernized promises based API similar to FileEntry/DirectoryEntry to be used in writable files.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e711fc3c405288575ddd053d0aaf4958c9141ca3 commit e711fc3c405288575ddd053d0aaf4958c9141ca3 Author: Marijn Kruisselbrink <mek@chromium.org> Date: Wed Aug 22 21:09:01 2018 [FileSystem] Start adding new FileSystem*Handle interfaces. These are more or less promisified versions of the existing FileEntry and DirectoryEntry interfaces. Tbr: jbroman@chromium.org Bug: 872465 Change-Id: Idccd40c4ef3e94bbf12be2d5a1bb6e44019929ab Reviewed-on: https://chromium-review.googlesource.com/1176555 Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#585244} [modify] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/BUILD.gn [modify] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/entry.idl [modify] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/entry_base.cc [modify] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/entry_base.h [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_base_handle.cc [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_base_handle.h [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_base_handle.idl [modify] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_callbacks.cc [modify] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_callbacks.h [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.cc [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.h [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.idl [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_file_handle.cc [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_file_handle.h [add] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/filesystem/file_system_file_handle.idl [modify] https://crrev.com/e711fc3c405288575ddd053d0aaf4958c9141ca3/third_party/blink/renderer/modules/modules_idl_files.gni
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a6a0cab0631500581bab3d33a69746212fb1301 commit 9a6a0cab0631500581bab3d33a69746212fb1301 Author: Marijn Kruisselbrink <mek@chromium.org> Date: Thu Aug 23 02:06:39 2018 [FileSystem] Use more descriptive error messages/codes in new APIs. This adds a method to blink::FileError that more or less does the same as blink::FileError::CreateDOMException(content::FileErrorToWebFileError(code)), just without the extra conversion through WebFileError and blink::FileError::ErrorCode in between. Bug: 872460, 872465 Change-Id: I6b7f94d9a3da2fa730cf78f5a74d5315d34c95c0 Reviewed-on: https://chromium-review.googlesource.com/1185791 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#585367} [modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/core/DEPS [modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/core/fileapi/file_error.cc [modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/core/fileapi/file_error.h [modify] https://crrev.com/9a6a0cab0631500581bab3d33a69746212fb1301/third_party/blink/renderer/modules/filesystem/file_system_writer.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c9230c467a4af8f66c0c04b7b1b6179c6a661a15 commit c9230c467a4af8f66c0c04b7b1b6179c6a661a15 Author: Marijn Kruisselbrink <mek@chromium.org> Date: Mon Aug 27 18:42:15 2018 [FileSystem] Hook up new FileWriter API to backend. Implements method to create a FileWriter for a FileSystemFileHandle, as well as fixes a bug in the FileSystemWriter implementation. Bug: 872460, 872465 Change-Id: Idfd7d2b486a7f2e1b0ec3f996ba940e10236b764 Reviewed-on: https://chromium-review.googlesource.com/1185624 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#586335} [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/browser/fileapi/file_system_manager_impl.cc [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/browser/fileapi/file_system_manager_impl.h [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/file_system_dispatcher.cc [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/file_system_dispatcher.h [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/webfilesystem_impl.cc [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/content/renderer/fileapi/webfilesystem_impl.h [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/public/mojom/filesystem/file_system.mojom [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/public/platform/DEPS [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/public/platform/web_file_system.h [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/renderer/modules/filesystem/file_system_file_handle.cc [modify] https://crrev.com/c9230c467a4af8f66c0c04b7b1b6179c6a661a15/third_party/blink/renderer/modules/filesystem/file_system_writer.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/3cc682ba5ab16ba591f6ebb93cbaaab5662d4eee commit 3cc682ba5ab16ba591f6ebb93cbaaab5662d4eee Author: Marijn Kruisselbrink <mek@chromium.org> Date: Fri Aug 31 19:31:58 2018 Add AsyncIterator to well-known symbols. Bug: chromium:872465 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: I75eccab304405569b40c5dcc18177354372a02c9 Reviewed-on: https://chromium-review.googlesource.com/1199464 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#55563} [modify] https://crrev.com/3cc682ba5ab16ba591f6ebb93cbaaab5662d4eee/include/v8.h [modify] https://crrev.com/3cc682ba5ab16ba591f6ebb93cbaaab5662d4eee/src/api.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/422f32b96103fffdb403f998fa4754b0556e05be commit 422f32b96103fffdb403f998fa4754b0556e05be Author: Marijn Kruisselbrink <mek@chromium.org> Date: Tue Sep 11 19:33:47 2018 [FileSystem] Implement getEntries() and ability to create new files and directories. This takes a somewhat hacky approach to return an async iterator from getEntries(), but at least it makes for await work on it. Also adds create option to getFile and getDirectory to be able to create new entries. Bug: 872465 Change-Id: I297c89c917bc86dfc2b3bbcf2d501ff5e59a85d7 Reviewed-on: https://chromium-review.googlesource.com/1197904 Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#590438} [modify] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/BUILD.gn [modify] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.cc [modify] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.h [modify] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.idl [add] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_directory_iterator.cc [add] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_directory_iterator.h [add] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_directory_iterator.idl [add] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_directory_iterator_entry.idl [add] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_get_directory_options.idl [add] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/filesystem/file_system_get_file_options.idl [modify] https://crrev.com/422f32b96103fffdb403f998fa4754b0556e05be/third_party/blink/renderer/modules/modules_idl_files.gni
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ef9a0b41fb8e209e6774e5610816a21865b84396 commit ef9a0b41fb8e209e6774e5610816a21865b84396 Author: Marijn Kruisselbrink <mek@chromium.org> Date: Fri Sep 14 17:23:50 2018 [FileSystem] Slightly refine async iterator directory entries implementation. Addressing some of the post-land feedback from https://crrev.com/c/1197904. Bug: 872465 Change-Id: I9a959aa7234261a722e424144167e2344386ddda Reviewed-on: https://chromium-review.googlesource.com/1225214 Reviewed-by: Victor Costan <pwnall@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#591381} [modify] https://crrev.com/ef9a0b41fb8e209e6774e5610816a21865b84396/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.cc [modify] https://crrev.com/ef9a0b41fb8e209e6774e5610816a21865b84396/third_party/blink/renderer/modules/filesystem/file_system_directory_iterator.h [modify] https://crrev.com/ef9a0b41fb8e209e6774e5610816a21865b84396/third_party/blink/renderer/modules/filesystem/file_system_directory_iterator.idl [modify] https://crrev.com/ef9a0b41fb8e209e6774e5610816a21865b84396/third_party/blink/renderer/modules/filesystem/file_system_directory_iterator_entry.idl
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/392e7bed086704b18b00c98ed29e797f47cae4f7 commit 392e7bed086704b18b00c98ed29e797f47cae4f7 Author: Marijn Kruisselbrink <mek@chromium.org> Date: Mon Sep 17 20:36:25 2018 [FileSystem] Expose more operations on the new filesystem handle types. This adds copyTo, moveTo, remove and removeRecursively, as well as adding a bunch of extra tests for these methods. Also cleanup the file writer tests a bit (primarily correct argument order for assertions). Bug: 872465 Change-Id: Ie2ce86ae6f5cc15eb72cf5e880e90c56bb29e7ea Reviewed-on: https://chromium-review.googlesource.com/1226024 Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Daniel Murphy <dmurph@chromium.org> Cr-Commit-Position: refs/heads/master@{#591805} [add] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/FileSystemBaseHandle-copyTo.html [add] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/FileSystemBaseHandle-moveTo.html [add] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/FileSystemBaseHandle-remove.html [add] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/FileSystemDirectoryHandle-getDirectory.html [add] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/FileSystemDirectoryHandle-getFile.html [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/file-writer.html [add] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/fast/filesystem/writable-files/resources/test-helpers.js [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_base_handle.cc [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_base_handle.h [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_base_handle.idl [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_callbacks.cc [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_callbacks.h [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.cc [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.h [modify] https://crrev.com/392e7bed086704b18b00c98ed29e797f47cae4f7/third_party/blink/renderer/modules/filesystem/file_system_directory_handle.idl
Comment 1 by mek@chromium.org
, Aug 15Owner: mek@chromium.org
Status: Assigned (was: Available)