# File lib/win32/file.rb, line 459 def dirname(file) fpath = false file = file.dup if file.include?('/') file.tr!('/', "\\") fpath = true end if PathIsRelative(file) return '.' end if PathIsRoot(file) file.tr!("\\", '/') if fpath return file end PathRemoveFileSpec(file) file = file.split(0.chr).first PathRemoveBackslash(file) file.tr!("\\", '/') if fpath file end