Add Pathname.resolved_path
This commit is contained in:
parent
5d3a226149
commit
5f5f820d12
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user