src/Subjects/FilesystemTrait.php
/**
     * 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.

@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 . @param string $path The path to be resolved @return string The resolved path @throws \ InvalidArgumentException Is thrown if the path can not be resolved
public function resolvePath($path)
    {
        if ($this->getFilesystemAdapter()->isDir($path)) {
            return $path;
        }
        $originalPath = $path;
        if ($this->getFilesystemAdapter()->isDir($path = getcwd() . DIRECTORY_SEPARATOR . ltrim($path, '/'))) {
            return $path;
        }
        throw new \InvalidArgumentException(
            sprintf('Directory %s doesn\'t exist', $originalPath)
        );
    }
public function resolvePath ( $ path ) { if ( $ this -> getFilesystemAdapter ( ) -> isDir ( $ path ) ) { return $ path ; } $ originalPath = $ path ; if ( $ this -> getFilesystemAdapter ( ) -> isDir ( $ path = getcwd ( ) . DIRECTORY_SEPARATOR . ltrim ( $ path , '/' ) ) ) { return $ path ; } throw new \ InvalidArgumentException ( sprintf ( 'Directory %s doesn\'t exist' , $ originalPath ) ) ; }
This method tries to resolve the passed path and returns it.
This method tries to resolve the passed path and returns it .
// if we've an absolute path, return it immediately // temporarily save the path // try to prepend the actual working directory, assuming we've a relative path // throw an exception if the passed directory doesn't exists