GzipDetector
Utility class that provides the means to detect if a file is gzipped or not
Static Method Summary
Static Public Methods | ||
public static |
Determines if a file is gzipped or not by reading its the magic number |
|
public static |
isGzippedSync(filePath: string): boolean Synchronous version of isGzipped |
Static Public Methods
public static async isGzipped(filePath: string): Promise<boolean> source
Determines if a file is gzipped or not by reading its the magic number
Params:
Name | Type | Attribute | Description |
filePath | string | path to the file to detect |
Throw:
if the filePath is null or undefined or if another error occurred |