Utility class for dealing with (zipped) files.

Constructors

Methods

  • Tests if a file path exists (and if the user is able to access it).

    Parameters

    • filePath: string

    Returns Promise<boolean>

    true if accessible; false otherwise

  • Zips a file/directory.

    Parameters

    • filePath: string

      file/directory path

    Returns Promise<string>

    the file path of the resulting zip file

    Static

    Throws

    thrown if zipping fails

  • Determines if a file/path is a zip file.

    Parameters

    • filePath: string

      file/directory path

    Returns Promise<boolean>

    true if the file is zipped; false otherwise

    Static

  • Unzips a zip file.

    Parameters

    • filePath: string
    • zipFilePath: string

    Returns Promise<unknown>

    Static

    Throws

    file needs to exist

    Throws

    thrown if unzipping fails

  • Deletes an (empty) folder.

    Parameters

    • filePath: string

      path to the directory

    Returns Promise<void>

  • Removes a zip file.

    Parameters

    • filePath: string

      file path excluding the .* at the end

    Returns Promise<void>

    Static

Generated using TypeDoc