Class: FuseFS::FuseDir

Inherits:
Object
  • Object
show all
Defined in:
lib/fusefs.rb

Direct Known Subclasses

MetaDir

Instance Method Summary collapse

Instance Method Details

#scan_path(path) ⇒ Object



38
39
40
# File 'lib/fusefs.rb', line 38

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

#split_path(path) ⇒ Object



30
31
32
33
34
35
36
37
# 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