Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Gem::Util.glob_files_in_dir

glob_files_in_dir(glob, base_path)

Globs for entries matching glob inside of base_path, returning absolute paths to the matching files and directories. Unlike a plain Dir.glob with an interpolated path, glob metacharacters in base_path are not treated as part of the pattern. Matched entries are joined to base_path literally, so an entry starting with ‘~` is not expanded into a home directory, and no other normalization is applied to them.

See also .correct_for_windows_path .gunzip .gzip also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0