How can I get the filename from a file path in Ruby?
For example if I have a path of 'C:\projects\blah.dll' and I just want the ‘blah’.
Is there a LastIndexOf method in Ruby?
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.
I haven’t been a Windows user in a long time, but the Pathname rdoc says it has no issues with directory-name separators on Windows.