megatron.data.image_folder.has_file_allowed_extension#

megatron.data.image_folder.has_file_allowed_extension(filename: str, extensions: Tuple[str, ...]) bool#

Checks if a file is an allowed extension. :param filename: path to a file :type filename: string :param extensions: extensions to consider (lowercase) :type extensions: tuple of strings

Returns:

True if the filename ends with one of given extensions

Return type:

bool