public function resolvePath($path)
    {

        // if we've an absolute path, return it immediately
        if ($this->getFilesystemAdapter()->isDir($path)) {
            return $path;
        }

        // temporarily save the path
        $originalPath = $path;

        // try to prepend the actual working directory, assuming we've a relative path
        if ($this->getFilesystemAdapter()->isDir($path = getcwd() . DIRECTORY_SEPARATOR . ltrim($path, '/'))) {
            return $path;
        }

        // throw an exception if the passed directory doesn't exists
        throw new \InvalidArgumentException(
            sprintf('Directory %s doesn\'t exist', $originalPath)
        );
    }
public function resolvePath($path)
    {

        // if we've an absolute path, return it immediately
        if ($this->getFilesystemAdapter()->isDir($path)) {
            return $path;
        }

        // temporarily save the path
        $originalPath = $path;

        // try to prepend the actual working directory, assuming we've a relative path
        if ($this->getFilesystemAdapter()->isDir($path = getcwd() . DIRECTORY_SEPARATOR . ltrim($path, '/'))) {
            return $path;
        }

        // throw an exception if the passed directory doesn't exists
        throw new \InvalidArgumentException(
            sprintf('Directory %s doesn\'t exist', $originalPath)
        );
    }
public function resolvePath ( $ path ) { // if we've an absolute path, return it immediately if ( $ this -> getFilesystemAdapter ( ) -> isDir ( $ path ) ) { return $ path ; } // temporarily save the path $ originalPath = $ path ; // try to prepend the actual working directory, assuming we've a relative path if ( $ this -> getFilesystemAdapter ( ) -> isDir ( $ path = getcwd ( ) . DIRECTORY_SEPARATOR . ltrim ( $ path , '/' ) ) ) { return $ path ; } // throw an exception if the passed directory doesn't exists throw new \ InvalidArgumentException ( sprintf ( 'Directory %s doesn\'t exist' , $ originalPath ) ) ; }
This method tries to resolve the passed path and returns it. If the path
is relative, the actual working directory will be prepended.

@param string $path The path to be resolved

@return string The resolved path
@throws \InvalidArgumentException Is thrown, if the path can not be resolved
This method tries to resolve the passed path and returns it . If the path is relative the actual working directory will be prepended .