diff options
| author | Adam Vandenberg | 2010-07-25 12:07:35 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-07-25 12:07:35 -0700 |
| commit | 64e026a550963365a5de85b2f1109530362147ae (patch) | |
| tree | cb9af90735c67c20f60126576a7e0bf10193fcb4 /Library | |
| parent | 1222f403f9d71ba4af2cce7ffd0d0a92102f261e (diff) | |
| download | homebrew-64e026a550963365a5de85b2f1109530362147ae.tar.bz2 | |
Add Pathname.resolved_path
Diffstat (limited to 'Library')
| -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 |
