tar
import { tar, untar } from 'sysopkit/op/tar';Creates an archive from a directory on the target host. Emits a change event on every run.
await tar({ src: '/var/www', dst: '/backup/www.tar.gz' });untar()
Section titled “untar()”Extracts an archive into a directory on the target host. Emits a change event on every run.
await untar({ src: '/backup/www.tar.gz', dst: '/var/www' });Options
Section titled “Options”Both functions accept src, dst, and an optional exclude list of patterns passed through as --exclude flags:
await tar({ src: '/var/www', dst: '/backup/www.tar.gz', exclude: ['*.log'] });