is_archive#

scikitplot.corpus.is_archive(path)[source]#

Check if a file path has a supported archive extension.

Parameters:
pathstr or Path

File path to check.

Returns:
bool

True if the file extension (or compound extension) matches a supported archive format.

Parameters:

path (str | Path)

Return type:

bool

Examples

>>> is_archive("data.zip")
True
>>> is_archive("data.tar.gz")
True
>>> is_archive("data.pdf")
False