import { default } from "https://deno.land/x/ayonli_jsext@v0.9.72/archive/tar.ts";
Archives the specified directory and puts it to the specified tarball file.
NOTE: This function puts the directory itself into the archive, similar to
tar -cf archive.tar <directory>
in Unix-like systems.
Examples
Example 1
Example 1
import { tar } from "@ayonli/jsext/archive";
await tar("/path/to/directory", "/path/to/archive.tar");
// with gzip
await tar("/path/to/directory", "/path/to/archive.tar.gz", { gzip: true });
Parameters
optional
options: TarOptionsCreates a Tarball instance and puts the the specified directory into the archive.
NOTE: This function puts the directory itself into the archive, similar to
tar -cf archive.tar <directory>
in Unix-like systems.
Examples
Example 1
Example 1
import { tar } from "@ayonli/jsext/archive";
const tarball = await tar("/path/to/directory");
Parameters
optional
options: FileSystemOptions