Move first batch of util fns to graph-parser.util

Still need to fix external.roam
This commit is contained in:
Gabriel Horner
2022-05-03 16:59:41 -04:00
parent af4b55c870
commit 85bd1fecb2
43 changed files with 211 additions and 166 deletions

View File

@@ -20,6 +20,7 @@
[lambdaisland.glogi :as log]
[promesa.core :as p]
[frontend.mobile.util :as mobile-util]
[logseq.graph-parser.util :as gp-util]
[clojure.core.async :as async]))
(defn remove-ignore-files
@@ -48,7 +49,7 @@
(cond
mobile-native?
(map (fn [{:keys [uri content size mtime]}]
{:file/path (util/path-normalize uri)
{:file/path (gp-util/path-normalize uri)
:file/last-modified-at mtime
:file/size size
:file/content content})
@@ -57,7 +58,7 @@
electron?
(map (fn [{:keys [path stat content]}]
(let [{:keys [mtime size]} stat]
{:file/path (util/path-normalize path)
{:file/path (gp-util/path-normalize path)
:file/last-modified-at mtime
:file/size size
:file/content content}))
@@ -71,7 +72,7 @@
path (-> (get-attr "webkitRelativePath")
(string/replace-first (str dir-name "/") ""))]
{:file/name (get-attr "name")
:file/path (util/path-normalize path)
:file/path (gp-util/path-normalize path)
:file/last-modified-at (get-attr "lastModified")
:file/size (get-attr "size")
:file/type (get-attr "type")