method

glob

glob(pattern, *args)
public

Get a sorted list of files matching the pattern. This method should be preferred to Dir[pattern] and Dir.glob(pattern) because the files returned are guaranteed to be sorted.