mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-06 15:33:06 +00:00
11 lines
254 B
Nim
11 lines
254 B
Nim
import ./ipfsobject
|
|
|
|
export ipfsobject
|
|
|
|
proc createObject*(file: File): IpfsObject =
|
|
let contents = file.readAll()
|
|
IpfsObject(data: cast[seq[byte]](contents))
|
|
|
|
proc writeToFile*(obj: IpfsObject, output: File) =
|
|
output.write(cast[string](obj.data))
|