Documentation

SplFileInfo extends SplFileInfo
in package

Extends \SplFileInfo to support relative paths.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$relativePath  : mixed
$relativePathname  : mixed
__construct()  : mixed
getContents()  : string
Returns the contents of the file.
getFilenameWithoutExtension()  : string
getRelativePath()  : string
Returns the relative path.
getRelativePathname()  : string
Returns the relative path name.

Properties

Methods

__construct()

public __construct(string $file, string $relativePath, string $relativePathname) : mixed
Parameters
$file : string

The file name

$relativePath : string

The relative path

$relativePathname : string

The relative path name

Return values
mixed

getContents()

Returns the contents of the file.

public getContents() : string
Tags
throws
RuntimeException
Return values
string

the contents of the file

getFilenameWithoutExtension()

public getFilenameWithoutExtension() : string
Return values
string

getRelativePath()

Returns the relative path.

public getRelativePath() : string

This path does not contain the file name.

Return values
string

the relative path

getRelativePathname()

Returns the relative path name.

public getRelativePathname() : string

This path contains the file name.

Return values
string

the relative path name

Search results