PHP Class FileNamingResolver\FileInfo

Author: Victor Bocharsky ([email protected])
Inheritance: extends SplFileInfo
Afficher le fichier Open project: bocharsky-bw/FileNamingResolver Class Usage Examples

Méthodes publiques

Méthode Description
changeBasename ( string $basename ) : FileInfo Changes base name of file without extension (or base name of directory).
changeExtension ( string $extension ) : FileInfo Changes file extension.
changePath ( string $path ) : FileInfo Changes directory path to the file / directory.
createPathname ( string $path, string $basename, string $extension = '' ) : string Creates full pathname to the file / directory based on its path, basename and extension
getBasename ( string $suffix = null ) : string Returns base name of file without extension (or base name of directory).
getPathRelativeTo ( string $basePath ) : string
getPathnameRelativeTo ( string $basePathname ) : string
isExists ( ) : boolean Checks whether a file / directory exists.
purifyBasename ( string $basename ) : string
purifyExtension ( string $extension ) : string
purifyPath ( string $path ) : string
toString ( ) : string Converts object to a string representation.

Method Details

changeBasename() public méthode

Changes base name of file without extension (or base name of directory).
public changeBasename ( string $basename ) : FileInfo
$basename string
Résultat FileInfo

changeExtension() public méthode

Changes file extension.
public changeExtension ( string $extension ) : FileInfo
$extension string
Résultat FileInfo

changePath() public méthode

Changes directory path to the file / directory.
public changePath ( string $path ) : FileInfo
$path string
Résultat FileInfo

createPathname() public static méthode

Creates full pathname to the file / directory based on its path, basename and extension
public static createPathname ( string $path, string $basename, string $extension = '' ) : string
$path string Directory path to the file (or directory)
$basename string Base name of file without extension (or base name of directory)
$extension string [OPTIONAL] File extension (empty for directory)
Résultat string

getBasename() public méthode

Returns base name of file without extension (or base name of directory).
public getBasename ( string $suffix = null ) : string
$suffix string
Résultat string

getPathRelativeTo() public méthode

public getPathRelativeTo ( string $basePath ) : string
$basePath string
Résultat string

getPathnameRelativeTo() public méthode

public getPathnameRelativeTo ( string $basePathname ) : string
$basePathname string
Résultat string

isExists() public méthode

Checks whether a file / directory exists.
public isExists ( ) : boolean
Résultat boolean

purifyBasename() public static méthode

public static purifyBasename ( string $basename ) : string
$basename string
Résultat string

purifyExtension() public static méthode

public static purifyExtension ( string $extension ) : string
$extension string
Résultat string

purifyPath() public static méthode

public static purifyPath ( string $path ) : string
$path string
Résultat string

toString() public méthode

Converts object to a string representation.
public toString ( ) : string
Résultat string