classes/phing/tasks/system/ResolvePathTask.php
public function main()
    {
        if (!$this->propertyName) {
            throw new BuildException("You must specify the propertyName attribute", $this->getLocation());
        }

        // Currently only files are supported
        if ($this->file === null) {
            throw new BuildException("You must specify a path to resolve", $this->getLocation());
        }

        $fs = FileSystem::getFileSystem();

        // if dir attribute was specified then we should
        // use that as basedir to which file was relative.
        // -- unless the file specified is an absolute path
        if ($this->dir !== null && !$fs->isAbsolute(new PhingFile($this->file))) {
            $this->file = new PhingFile($this->dir->getPath(), $this->file);
        }

        $resolved = $this->project->resolveFile($this->file);

        $this->log("Resolved " . $this->file . " to " . $resolved->getAbsolutePath(), $this->logLevel);
        $this->project->setProperty($this->propertyName, $resolved->getAbsolutePath());
    }
public function main()
    {
        if (!$this->propertyName) {
            throw new BuildException("You must specify the propertyName attribute", $this->getLocation());
        }

        // Currently only files are supported
        if ($this->file === null) {
            throw new BuildException("You must specify a path to resolve", $this->getLocation());
        }

        $fs = FileSystem::getFileSystem();

        // if dir attribute was specified then we should
        // use that as basedir to which file was relative.
        // -- unless the file specified is an absolute path
        if ($this->dir !== null && !$fs->isAbsolute(new PhingFile($this->file))) {
            $this->file = new PhingFile($this->dir->getPath(), $this->file);
        }

        $resolved = $this->project->resolveFile($this->file);

        $this->log("Resolved " . $this->file . " to " . $resolved->getAbsolutePath(), $this->logLevel);
        $this->project->setProperty($this->propertyName, $resolved->getAbsolutePath());
    }
public function main ( ) { if ( ! $ this -> propertyName ) { throw new BuildException ( "You must specify the propertyName attribute" , $ this -> getLocation ( ) ) ; } // Currently only files are supported if ( $ this -> file === null ) { throw new BuildException ( "You must specify a path to resolve" , $ this -> getLocation ( ) ) ; } $ fs = FileSystem :: getFileSystem ( ) ; // if dir attribute was specified then we should // use that as basedir to which file was relative. // -- unless the file specified is an absolute path if ( $ this -> dir !== null && ! $ fs -> isAbsolute ( new PhingFile ( $ this -> file ) ) ) { $ this -> file = new PhingFile ( $ this -> dir -> getPath ( ) , $ this -> file ) ; } $ resolved = $ this -> project -> resolveFile ( $ this -> file ) ; $ this -> log ( "Resolved " . $ this -> file . " to " . $ resolved -> getAbsolutePath ( ) , $ this -> logLevel ) ; $ this -> project -> setProperty ( $ this -> propertyName , $ resolved -> getAbsolutePath ( ) ) ; }
Perform the resolution & set property.
Perform the resolution & set property .