This commit is contained in:
Ryan Oldenburg 2020-12-21 17:57:54 -06:00
parent de0cf40cb9
commit e7b604f084
4 changed files with 5 additions and 5 deletions

View File

@ -283,12 +283,12 @@ Extracts the files stored in tarball to the destination directory. The path to t
proc extractAll(tarball: Tarball; dest: string) {.raises: [ZippyError, OSError, IOError], tags: [ReadDirEffect, ReadEnvEffect, ReadIOEffect, WriteDirEffect, WriteIOEffect].}
```
## **proc** extractTarball
## **proc** extractAll
Extracts the files in the tarball located at tarPath into the destination directory. Supports .tar, .tar.gz, .taz and .tgz file extensions.
```nim
proc extractTarball(tarPath, dest: string) {.raises: [IOError, ZippyError, OSError], tags: [ReadIOEffect, ReadDirEffect, ReadEnvEffect, WriteDirEffect, WriteIOEffect].}
proc extractAll(tarPath, dest: string) {.raises: [IOError, ZippyError, OSError], tags: [ReadIOEffect, ReadDirEffect, ReadEnvEffect, WriteDirEffect, WriteIOEffect].}
```
## **proc** createTarball

View File

@ -3,4 +3,4 @@ import os, zippy/tarballs
# Extracts all of the files and directories in the tarball into output/dir.
createDir("output") # Ensure the path to the output dir exists
extractTarball("tests/data/tarballs/Nim-1.4.2.tar.gz", "output/dir")
extractAll("tests/data/tarballs/Nim-1.4.2.tar.gz", "output/dir")

View File

@ -210,7 +210,7 @@ proc extractAll*(tarball: Tarball, dest: string) =
moveDir(tmpDir, dest)
proc extractTarball*(tarPath, dest: string) =
proc extractAll*(tarPath, dest: string) =
## Extracts the files in the tarball located at tarPath into the destination
## directory. Supports .tar, .tar.gz, .taz and .tgz file extensions.
let tarball = Tarball()

View File

@ -1,4 +1,4 @@
version = "0.4.0"
version = "0.4.1"
author = "Ryan Oldenburg"
description = "Pure Nim implementation of deflate, zlib, gzip and zip."
license = "MIT"