Add Pathname.resolved_path

This commit is contained in:
Adam Vandenberg 2010-07-25 12:07:35 -07:00
parent 5d3a226149
commit 5f5f820d12

View File

@ -196,6 +196,10 @@ class Pathname
children.select{ |child| child.directory? }
end
def resolved_path
self.symlink? ? dirname+readlink : self
end
def resolved_path_exists?
(dirname+readlink).exist?
end