class FuseFS::FuseDir

Public Instance Methods

scan_path(path) click to toggle source
# File lib/fusefs.rb, line 38
def scan_path(path)
  path.scan(/[^\/]+/)
end
split_path(path) click to toggle source
# File lib/fusefs.rb, line 30
def split_path(path)
  cur, *rest = path.scan(/[^\/]+/)
  if rest.empty?
    [ cur, nil ]
  else
    [ cur, File.join(rest) ]
  end
end