Documentation

SplFileInfo extends SplFileInfo
in package

Extends \SplFileInfo to support relative paths.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Properties

$relativePath  : mixed
$relativePathname  : mixed

Methods

__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

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


        
On this page

Search results