Gets a file relative to this file in the repository and sends it to the browser.
Checks the function repository::supports_relative_file() to make sure it can be used.

@param string $relativepath the relative path to the file we are trying to access
9245
public function send_relative_file($relativepath) {
        if ($this->repository && $this->repository->supports_relative_file()) {
            $relativepath = clean_param($relativepath, PARAM_PATH);
            $this->repository->send_relative_file($this, $relativepath);
        } else {
            send_file_not_found();
        }
    }
981229
protected function getAbsolutePath($relativePath)
    {
        return rtrim($this->path, DIRECTORY_SEPARATOR)
             . DIRECTORY_SEPARATOR
             . ltrim($relativePath, DIRECTORY_SEPARATOR);
    }
163745
public function pathToClass($relativePath)
    {
        if (strpos($relativePath, '/') !== false) {
            $relativePath = dirname($relativePath).'/'.basename($relativePath, '.php');
        } else {
            $relativePath = basename($relativePath, '.php');
        }

        return str_replace('/', '\\', $relativePath);
    }
456048
public function getFilePath($filename, $basedir, $relative)
    {
        // Validating the 'file' information
        $files = (array) $filename;

        // Processing the file information
        foreach ($files as $index => $file) {
            $absolutefilename = (($relative === false) ? ($basedir . PhingFile::$separator) : '');
            $absolutefilename .= $file;
            if ($relative === false) {
                $files[$index] = (new FileUtils())->normalize($absolutefilename);
            } else {
                $files[$index] = $absolutefilename;
            }
        }

        return (is_array($filename) ? $files : $files[0]);
    }
1227312
def getFile(self, name, relative=None):
        
        if self.pathCallback is not None:
            return getFile(self._getFileDeprecated(name, relative))
        return getFile(name, relative or self.pathDirectory)
760285
protected function getLockPath(FilePath $filePath)
    {
        $name = $filePath->getName();
        $relativeLockPath = $filePath->getParentPath()->appendFile('.' . $name . '.lock');

        return $relativeLockPath;
    }
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;
    }
495709
public function readFileStream($containerName, $fileName, $relativePath)
    {
        return $this->getFactory()
            ->createStorage($containerName)
            ->readFileStream($containerName, $fileName, $relativePath);
    }
757340
public static function get($filePath)
    {
        $fileName = basename($filePath);
        if (!array_key_exists($fileName, static::$files)) {
            try {
                $file = new File($filePath);
            } catch (\Exception $e) {
                $file = false;
            }

            static::$files[$fileName] = $file;
        }

        return static::$files[$fileName];
    }
755409
protected function resolvePublicResource($relativePath)
    {
        // Determine if we should search both public and base resources, or only public
        $publicOnly = $this->inferPublicResourceRequired($relativePath);

        // Search public folder first, and unless `public/` is prefixed, also private base path
        $publicPath = Path::join(Director::publicFolder(), $relativePath);
        if (file_exists($publicPath)) {
            // String is a literal url comitted directly to public folder
            return [true, $publicPath, $relativePath];
        }

        // Fall back to private path (and assume expose will make this available to _resources/)
        $privatePath = Path::join(Director::baseFolder(), $relativePath);
        if (!$publicOnly && file_exists($privatePath)) {
            // String is private but exposed to _resources/, so rewrite to the symlinked base
            $relativePath = Path::join(RESOURCES_DIR, $relativePath);
            return [true, $privatePath, $relativePath];
        }

        // File doesn't exist, fail
        return [false, null, $relativePath];
    }
429375
public function deleteFile($containerName, $filePath, $relativePath)
    {
        return $this->getFactory()
            ->createStorage($containerName)
            ->deleteFile($containerName, $filePath, $relativePath);
    }
1113618
private function _correctRelativePath ($typePath, $relativePath) {
		$result = str_replace('\\', '/', $relativePath);
		if (substr($relativePath, 0, 2) == './') {
			if (self::$_viewScriptsFullPathBase === NULL)
				self::_initViewScriptsFullPathBase();
			$typedViewDirFullPath = implode('/', [
				self::$_viewScriptsFullPathBase, $typePath
			]);
			$renderedFullPaths = & $this->__protected['renderedFullPaths'];
			$lastRenderedFullPath = $renderedFullPaths[count($renderedFullPaths) - 1];
			$renderedRelPath = substr($lastRenderedFullPath, strlen($typedViewDirFullPath));
			$renderedRelPathLastSlashPos = strrpos($renderedRelPath, '/');
			if ($renderedRelPathLastSlashPos !== FALSE) {
				$result = substr($renderedRelPath, 0, $renderedRelPathLastSlashPos + 1).substr($relativePath, 2);
				$result = ltrim($result, '/');
			}
		}
		return $result;
	}
376106
public function getPath($relativePath, $fileName = null, $ext = '.php')
    {
        $path = Path::join($this->dir, $relativePath);

        return is_null($fileName) ? $path : Path::join($path, $fileName . $ext);
    }
4815
def get_path_url(path, relative=False):
    
    if relative:
        return os.path.relpath(path)
    else:
        return 'file://%s' % os.path.abspath(path)
463801
private static String getAbsolutePath(final String relativePath) {
    final File outputFile = new File(relativePath);
    return outputFile.getAbsolutePath();
  }
1026926
public function relativePath($path = null)
    {
        if (null === $path) {
            return str_replace(asset('/'), '', $this->relativePath);
        }

        $this->relativePath = $path;

        return $this;
    }
236939
public function readFileStream($containerName, $fileName, $relativePath)
    {
        $fullFileName = $this->getFullFileName($containerName, $fileName, $relativePath);

        return $this->filesystem->readStream($fullFileName);
    }