Method: Path#mountpoint?

Defined in:
lib/path/predicates.rb

#mountpoint?Boolean

Returns true if self points to a mountpoint.

Returns:

  • (Boolean)


24
25
26
27
28
29
30
31
32
# File 'lib/path/predicates.rb', line 24

def mountpoint?
  begin
    stat1 = lstat
    stat2 = parent.lstat
    stat1.dev != stat2.dev or stat1.ino == stat2.ino
  rescue Errno::ENOENT
    false
  end
end