Apply the transformer on the absolute path and return an altered version of it.

@param string $absolutePath

@return string|false
506081
public function apply($absolutePath)
    {
        $info = pathinfo($absolutePath);

        if (isset($info['extension']) && false !== strpos(strtolower($info['extension']), 'pdf') && file_exists($absolutePath)) {
            // If it doesn't exist yet, extract the first page of the PDF
            $previewFilename = $this->getPreviewFilename($absolutePath);
            if (!file_exists($previewFilename)) {
                $this->imagick->readImage($absolutePath . '[0]');
                $this->imagick->setImageFormat('jpg');
                $this->imagick->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);
                $this->imagick->writeImage($previewFilename);
                $this->imagick->clear();
            }

            $absolutePath = $previewFilename;
        }

        return $absolutePath;
    }
93220
public function applyFilter($path, $filter, $absolute = false)
    {
        return $this->cachePathResolver->getBrowserPath($path, $filter, $absolute);
    }
1315280
public function handle($absolutePath, $relativePath)
    {
        if (!$this->itemSource) {
            throw new \common_Exception('Missing required parameter: item source');
        }

        // store locally, in a safe directory
        $safePath = '';
        if (dirname($relativePath) !== '.') {
            $safePath = str_replace('../', '', dirname($relativePath)) . '/';
        }

        $info = $this->itemSource->add($absolutePath, basename($absolutePath), $safePath);
        \common_Logger::i('Asset file \'' . $absolutePath . '\' copied.');
        return $info;
    }
1275327
def get_absolute_path(self, path):
        '''
        
        '''
        if os.path.isabs(path):
            return path
        else:
            return os.path.abspath(os.path.join(self.config.BASEDIR, path))
1210273
protected function normaliseFilename($absolutePath) {
		$regex = sprintf(
			'#^%s#',
			addslashes(BASE_PATH) . DIRECTORY_SEPARATOR
		);
		return preg_replace($regex, '', $absolutePath);
	}
491459
public function getPath($absolute = false)
	{
		if(!$absolute)
		    return $this->properties['path'];

		$routes = $this->getFullRoutes();

		$paths = array();

		foreach($routes as $route)
		{
			$path = $route->getProperty('path');

			if($path == '')
				continue;

			$paths[] = $path;
		}

		return trim(implode('/', $paths), '/');
	}
611135
public function getPathRelativeTo($basePath)
    {
        $basePath = $this->purifyPath($basePath).static::SEPARATOR_DIRECTORY;

        $relativePath = $this->getPath();
        $prefix = mb_substr($relativePath, 0, mb_strlen($basePath));
        if ($prefix === $basePath) {
            $relativePath = mb_substr($relativePath, mb_strlen($prefix));
        }

        return $relativePath;
    }
330332
public function isAncestorOf(AbsolutePathInterface $path)
    {
        $parentAtoms = $this->normalize()->atoms();

        return $parentAtoms === array_slice(
            $path->normalize()->atoms(),
            0,
            count($parentAtoms)
        );
    }
76285
function abspath( $path = false ) {
		if ( ! $path )
			$path = ABSPATH;
		$folder = $this->find_folder( $path );

		// Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare.
		if ( ! $folder && $this->is_dir('/wp-includes') )
			$folder = '/';
		return $folder;
	}
1299320
public function handle($absolutePath, $relativePath)
    {
        $safePath = $this->safePath($relativePath);
        $this->encodeStimulusImages($absolutePath);

        $info = $this->getItemSource()->add($absolutePath, basename($absolutePath), $safePath);
        \common_Logger::i('Stimulus file \'' . $absolutePath . '\' copied.');

        return $info;
    }
790186
private function resolvePath($path)
    {
        // Find and replace the @BundleName with the absolute path to the bundle.
        $matches = [];
        preg_match('/(^|\/)@(\w+)/', $path, $matches);
        if (isset($matches[0], $matches[2], $this->bundle_paths[$matches[2]])) {
            return realpath(str_replace($matches[0], $this->bundle_paths[$matches[2]], $path));
        }

        // The path doesn't contain a bundle name. In this case it must exist in %kernel.root_dir%/Resources/views
        $path = $this->root_dir . DIRECTORY_SEPARATOR . 'Resources' . DIRECTORY_SEPARATOR . $path;
        if (file_exists($path)) {
            return $path;
        }

        return false;
    }
108646
protected function _abspath($path) {
		return $path == DIRECTORY_SEPARATOR ? $this->root : $this->root.DIRECTORY_SEPARATOR.$path;
	}
902150
public static function isAbsolute($path)
    {
        list($prefix, $path, $absolute) = self::_startNormalize($path);

        return $absolute;
    }
1205126
public function absolute($relativePath = null)
    {
        if ($this->isEmptyPath($relativePath)) {
            return $this->basePath;
        }

        if ($this->startsWithBasePath($relativePath)) {
            return $relativePath;
        }

        if (!$baseUrl = $this->getBaseUrl()) {
            return $this->basePath.'/'.trim($relativePath, '/');
        }

        if ($this->startsWithBaseUrl($relativePath)) {
            return $this->absolute($this->relative($relativePath));
        }

        return $this->basePath.'/'.trim($relativePath, '/');
    }
301488
def _absolute_path(path, relative_to=None):
    '''
    
    '''

    if path and os.path.isabs(path):
        return path
    if path and relative_to is not None:
        _abspath = os.path.join(relative_to, path)
        if os.path.isfile(_abspath):
            log.debug(
                'Relative path \'%s\' converted to existing absolute path '
                '\'%s\'', path, _abspath
            )
            return _abspath
    return path
203490
protected function filterPath($absolutePath)
    {
        // Unresolved paths with '..' are invalid
        if (Str::contains($absolutePath, '..')) return false;
        return Str::startsWith($absolutePath, $this->outputdir . '/');
    }
1351689
public function getPathMapping($repositoryPath)
    {
        if (!isset($this->pathMappings[$repositoryPath])) {
            throw NoSuchPathMappingException::forRepositoryPath($repositoryPath);
        }

        return $this->pathMappings[$repositoryPath];
    }