Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Pathname#mountpoint?
mountpoint?
ext/pathname/lib/pathname.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/ext/pathname/lib/pathname.rb, line 201
def mountpoint?
begin
stat1 = self.lstat
stat2 = self.parent.lstat
stat1.dev != stat2.dev || stat1.ino == stat2.ino
rescue Errno::ENOENT
false
end
end
Returns true if self points to a mountpoint.