Skip to content
UnTar tool for InterSystems products
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.ci
.github
.vscode
src/cls/%zUtils
tests
.editorconfig
.gitignore
Dockerfile
LICENSE
Makefile
README.md
docker-compose.yml

README.md

Tar compress tool for InterSystems products

This tool helps to extract data right from tar.gz or just tar archives with ObjectScript. Or compact any files/folders with tar format and make tar.gz.

Installation

Import and compile file zUtils.FileBinaryTar.xml to %SYS namespace.

Examples

Extract tar.gz file

  Set gzip = 1
  Set extracted = ##class(%zUtils.FileBinaryTar).ExtractFile("/tmp/some.tgz", gzip)
  Set tSC = extracted.FindPath("folder/subfolder/test.txt", .file)
  Set fileContent = file.fileData
  While 'fileContent.AtEnd {
    /// read file from archive
  }
  Set tSC = extracted.ExtractTo("/tmp/some/place")

Compact folder/file to tar.gz file

  Set gzip = 1
  Set archive = ##class(%zUtils.FileBinaryTar).Compact("/tmp/some/place", gzip, "/tmp/some.tgz")
You can’t perform that action at this time.