This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-10
Channels
- # announcements (48)
- # asami (8)
- # babashka (186)
- # beginners (56)
- # calva (42)
- # clerk (84)
- # clj-kondo (75)
- # cljdoc (21)
- # clojure (121)
- # clojure-art (1)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-conj (2)
- # clojure-europe (10)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (2)
- # clojure-norway (9)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # clojure-uk (2)
- # clojurescript (11)
- # cursive (30)
- # datalevin (20)
- # datomic (4)
- # fulcro (5)
- # gratitude (1)
- # hyperfiddle (89)
- # introduce-yourself (1)
- # java (5)
- # jobs-discuss (8)
- # lsp (89)
- # malli (57)
- # membrane (16)
- # off-topic (12)
- # pathom (38)
- # releases (5)
- # shadow-cljs (17)
- # tools-deps (18)
- # xtdb (62)
I feel like I’m getting close:
(let [bytes (into-array Byte/TYPE (job :artifacts))]
(with-open [zis (ZipInputStream. (ByteArrayInputStream. bytes))]
(loop [acc []]
(if-let [entry (.getNextEntry zis)]
(recur (conj acc {:size (.getSize entry)
:name (.getName entry)
:dir? (.isDirectory entry)}))
acc))))
What I thought would happen here is, (.getNextEntry zis)
would yield the first jot of data, and zis
would be pointing at the next jot. That doesn’t seem to be happening? There’s only a single artifact in every job, and I’m expecting quite a few more than that. But surely I’m not supposed to pass (rest zis)
to recur
Maybe I’m not understanding what a ZipEntry is, and I need to turn those entries into input streams themselves? https://stackoverflow.com/a/15667326
From this, I’m wondering if it’s my data that’s bad — https://stackoverflow.com/questions/11784102/how-does-zipinputstream-getnextentry-work