Changeset f47b545


Ignore:
Timestamp:
12/08/11 21:15:12 (5 months ago)
Author:
mrook
Branches:
master
Children:
3d030ee
Parents:
c37741a
git-author:
Michiel Rook <mrook@…> (12/08/11 21:15:12)
git-committer:
Michiel Rook <mrook@…> (12/08/11 21:15:12)
Message:

Fixes #810 - allow resolving/dereferencing of symbolic links in available task

Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • classes/phing/tasks/system/AvailableTask.php

    r4f0388d rf47b545  
    4646    private $type = null; 
    4747    private $filepath = null; 
     48     
     49    private $followSymlinks = false; 
    4850 
    4951    function setProperty($property) { 
     
    6567    function setType($type) { 
    6668        $this->type = (string) strtolower($type); 
     69    } 
     70     
     71    public function setFollowSymlinks($followSymlinks) 
     72    { 
     73        $this->followSymlinks = (bool) $followSymlinks; 
    6774    } 
    6875     
     
    141148 
    142149    private function _checkFile1(PhingFile $file) { 
     150        // Resolve symbolic links 
     151        if ($this->followSymlinks && $file->isLink()) { 
     152            $file = new PhingFile($file->getLinkTarget()); 
     153        } 
     154         
    143155        if ($this->type !== null) { 
    144156            if ($this->type === "dir") { 
  • docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html

    r730cf45 rf47b545  
    247247                                <td>No</td> 
    248248                        </tr> 
     249            <tr> 
     250                <td>followSymlinks</td> 
     251                <td>Boolean</td> 
     252                <td>Whether to dereference symbolic links when looking up <em>file</em>.</td> 
     253                <td>false</td> 
     254                <td>No</td> 
     255            </tr> 
    249256                </tbody> 
    250257        </table> 
Note: See TracChangeset for help on using the changeset viewer.