Return the names of all files

Is it possible to return the names of all the files in a particular directory? Is their a function for this?

Example

Code:
My_List = GetFileNames(Graphics/Folder)
This should do:

Dir["Graphics/Folder/*"]The string is treated as a file glob, so you can, for example, get only .png files with "Graphics/Folder/*.png"./edit: Note that this will also return subfolders. You can use "File.file?" to filter them out.
There's multiple way. Here's another way.

Dir.foreach('file/path/') {|filename| puts filename}You can read for Dir documentation here http://ruby-doc.org/core-1.9.3/Dir.html
ah thank you both!

Original thread: https://forums.rpgmakerweb.com/threads/return-the-names-of-all-files.41156/