SplFileInfo
extends SplFileInfo
in package
Extends \SplFileInfo to support relative paths.
Tags
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
$relativePath
private
mixed
$relativePath
$relativePathname
private
mixed
$relativePathname
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
Return values
string —the contents of the file
getFilenameWithoutExtension()
public
getFilenameWithoutExtension() : string
Return values
stringgetRelativePath()
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