-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi, I was trying to do something like code below
Thanks for putting effort in this project.
proc addFile*(
archive: ZipArchive, content: string, path: string
) {.raises: [IOError, OSError, ZippyError].} =
## Adds a single file to the archive.
let (head, tail) = splitPath(path)
if head.len > 0 and head notin archive.contents:
archive.contents[(head & os.DirSep).toUnixPath()] =
ArchiveEntry(kind: ekDirectory)
archive.contents[path.toUnixPath()] = ArchiveEntry(
kind: ekFile,
contents: content,
lastModified: getTime(),
permissions: {},
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels