valid_extension(3)

LIBRARY
#include <xtend/file.h>
-lxtend

SYNOPSIS

bool    xt_valid_extension(const char *filename, const char *valid_ext)

ARGUMENTS
filename:   Name of the file to be checked
valid_ext:  Valid extension, not include .gz, .bz2, or .xz

DESCRIPTION
Verify that the filename extension on filename is either the valid extension provided or that extension followed by a compression extension, e.g. .gz, .bz2, .xz.

RETURN VALUES
true (defined in stdbool.h) if filename has a valid extension false if not

SEE ALSO
gzip(1), bzip2(1), xz(1)