Skip to content

Commit

Permalink
missing commit for make-progress-file-info-hashmap
Browse files Browse the repository at this point in the history
  • Loading branch information
retrogradeorbit committed Sep 12, 2022
1 parent 5810622 commit 0c36feb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/clj/spire/pod/scp.clj
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,29 @@
(scp-receive-ack in)
(debug "Received ACK"))

(defn make-progress-file-info-hashmap [d]
(cond
(instance? String d)
{:type :string
:name "[String Data]"
:length (count (.getBytes d))}

(instance? (Class/forName "[B") d)
{:type :byte-array
:name "[Byte Array]"
:length (count d)}

(instance? java.io.File d)
{:type (cond
(.isFile d)
:file

(.isDirectory d)
:directory)
:name (.getName d)
:path (.getPath d)
:length (.length d)})
)

(defn- scp-copy-file
"Send acknowledgement to the specified output stream"
Expand Down

0 comments on commit 0c36feb

Please sign in to comment.