Class: DokanFS::DokanDir

Inherits:
Object
  • Object
show all
Defined in:
ext/dokan-ruby-0.1.5.1229/lib/dokanfs.rb

Direct Known Subclasses

MetaDir

Instance Method Summary collapse

Instance Method Details

#scan_path(path) ⇒ Object



193
194
195
# File 'ext/dokan-ruby-0.1.5.1229/lib/dokanfs.rb', line 193

def scan_path(path)
  path.scan(/[^\/]+/)
end

#split_path(path) ⇒ Object



185
186
187
188
189
190
191
192
# File 'ext/dokan-ruby-0.1.5.1229/lib/dokanfs.rb', line 185

def split_path(path)
  cur, *rest = path.scan(/[^\/]+/)
  if rest.empty?
    [ cur, nil ]
  else
    [ cur, File.join(rest) ]
  end
end