8000 GitHub - daimor/isc-tar at v0.1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

daimor/isc-tar

Repository files navigation

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 src/cls/%zUtils/FileBinaryTar.cls 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")

About

UnTar tool for InterSystems products

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0