I am looping through a directory and copying all files. Right now I am doing string.EndsWith checks for ".jpg" or ".png", etc . .
Is there any more elegant way of determining if a file is an image (any image type) without the hacky check like above?