in Following code, metadata_files not returning [] but there is lots of file there, any idea/suggestion
here temp_dir is /tmp and METADATA_FILE_EXTENSION = .metadata so lot of .metadata file , nested inside /tmp
metadata_files = Dir.glob(File.join(temp_dir, "**" "*#{METADATA_FILE_EXTENSION}"))
See Question&Answers more detail:os