feat: restore dbs for native file stores

This commit is contained in:
Tienson Qin
2020-11-24 00:05:13 +08:00
parent 50a7a7c585
commit 14b6c64196
5 changed files with 53 additions and 22 deletions

View File

@@ -36,8 +36,10 @@
files (doall
(map (fn [file]
(let [handle (gobj/get file "handle")
get-attr #(gobj/get file %)]
{:file/path (get-attr "webkitRelativePath")
get-attr #(gobj/get file %)
path (-> (get-attr "webkitRelativePath")
(string/replace-first (str dir-name "/") ""))]
{:file/path path
:file/last-modified-at (get-attr "lastModified")
:file/size (get-attr "size")
:file/type (get-attr "type")