Is there any class in ruby for listing all the files in a directory and all the files in the subdirectory?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might look at
Dir.glob. You can pass it the**/*path which will give you everything in the folder and its subdirectories:Since you probably want a list of files, excluding folders, you can use: