Add jsdoc annotations to public interface
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabian Stamm 2020-07-28 19:41:57 +02:00
parent e7888075d6
commit 2e92ec337c
2 changed files with 16 additions and 0 deletions

0
tar/dev.sh Executable file → Normal file
View File

View 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,