Z
zdk
require 'pathname'
p = Pathname.new("C:\ruby\samples\myFile")
dir = p.dirname
base = p.basename
puts base
I just like to use "myFile",but p.basename seems not work on Windows
Platform.
How to solve this kind of problem?
any help or suggest would be greatly appreciated much.
Thanks a lot.
Warachet S.
p = Pathname.new("C:\ruby\samples\myFile")
dir = p.dirname
base = p.basename
puts base
I just like to use "myFile",but p.basename seems not work on Windows
Platform.
How to solve this kind of problem?
any help or suggest would be greatly appreciated much.
Thanks a lot.
Warachet S.