diff options
| author | Adam Vandenberg | 2010-07-25 12:07:35 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-07-25 12:07:35 -0700 |
| commit | 5f5f820d126d847ed10e4cfc8c13948db94384b2 (patch) | |
| tree | dcb5c1c5021086fbe2d2565fa01ca32a0d5e9a7a | |
| parent | 5d3a226149debf405753b439a88bd76264467b80 (diff) | |
| download | brew-5f5f820d126d847ed10e4cfc8c13948db94384b2.tar.bz2 | |
Add Pathname.resolved_path
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 0b1c27806..93a1f08cc 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -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 |
