Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Ruby
ruby filename from path
Sungwoo
Programming language:
Ruby
2021-03-28 05:25:56
0
Q:
ruby filename from path
AnhLe
Code:
Ruby
2021-07-14 02:26:16
path = "/path/to/file.ext" File.basename(path) # 'file.ext'
1
Tags
name
path
file
Related
rails get current path
New to Communities?
Join the community