Add jsdoc annotations to public interface
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e7888075d6
commit
2e92ec337c
0
tar/dev.sh
Executable file → Normal file
0
tar/dev.sh
Executable file → Normal file
@ -2,6 +2,12 @@ import { FS, Path } from "./deps.ts";
|
||||
|
||||
import { Tar, Untar } from "./tar.ts";
|
||||
|
||||
/**
|
||||
* Uncompresses a tar file to a certain location
|
||||
* @param {string} src Tar file to be uncompressed
|
||||
* @param {string} dest The location to uncompress to
|
||||
* @returns A promise that is resolved once the tar file finished uncompressing
|
||||
*/
|
||||
export async function uncompress(src: string, dest: string): Promise<void> {
|
||||
const tarFile = await Deno.open(src, { read: true });
|
||||
const untar = new Untar(tarFile);
|
||||
@ -23,9 +29,19 @@ export async function uncompress(src: string, dest: string): Promise<void> {
|
||||
}
|
||||
|
||||
export interface ICompressOptions {
|
||||
/**
|
||||
* Controls wether all files inside the tar should be prefixed with the foldername or not
|
||||
*/
|
||||
excludeSrc?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress file or folder into a .tar file
|
||||
* @param {string} src File or folder to compress
|
||||
* @param {string} dest Path of the resulting .tar file
|
||||
* @param {ICompressOptions} options Options to controll behavious
|
||||
* @returns A promise that is resolved once the tar file finished compressing
|
||||
*/
|
||||
export async function compress(
|
||||
src: string,
|
||||
dest: string,
|
||||
|
Loading…
Reference in New Issue
Block a user