tools-io-gs API Docs ![cljdoc badge](https://camo.githubusercontent.com/e315285dfd776649dff05d33b32fcd8fb8898a5991359f73f8cc6a0d768637cf/68747470733a2f2f636c6a646f632e6f72672f62616467652f636f6d2e6f736361726f2f746f6f6c732d696f2d6773)
Google Storage support for tools.io
.
[com.oscaro/tools-io-gs "0.X.X"] ; See (clojars release)
; read json
(doseq [x (read-jsons-file "gs://bucket/sample.jsons.gz")]
(println x))
; list files
(doseq [filename (list-files "gs://bucket/mydir/")]
(println filename))
; -> output:
; gs://bucket/mydir/example/raw-animals-aaaaaaaaaa.jsons.gz
; gs://bucket/mydir/example/raw-animals-aaaaaaaaab.jsons.gz
; gs://bucket/mydir/example/raw-animals-aaaaaaaaac.jsons.gz
; gs://bucket/mydir/example/raw-animals-aaaaaaaaad.jsons.gz
; gs://bucket/mydir/example/raw-animals-aaaaaaaaae.jsons.gz
; list files in a (virtual) directory
(doseq [filename (list-files "gs://bucket/mydir/" {:current-directory true})]
(println filename))
; list dirs
(->> (list-dirs "gs://bucket/dir")
count)
; -> output:
; gs://bucket/mydir/example/
; Get folder/file size
(sizeof "gs:/foo/bar") ;; => 8293
Copyright © 2016-2023 Oscaro.com
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.