Method | Description | |
---|---|---|
basename ( string path, string suffix = null ) : string |
Returns path component of path. Given a string containing a path to a file, this function will return the base name of the file. If the path ends in this will also be cut off. On Windows, both slash (/) and backslash (\) are used as path separator character. In other environments, it is the forward slash (/). |
|
dirname ( string path, int levels = 1 ) : string |
Returns directory name component of path.
|
|
pathinfo ( string path, PathInfoOptions options = PathInfoOptions.All ) : |
Extracts part(s) from a specified path.
|
|
realpath ( string path ) : string |
Returns canonicalized absolute path name.
|
|
sys_get_temp_dir ( ) : string |
Returns the path of the directory PHP stores temporary files in by default. Path ends with "\" |
|
tempnam ( string dir, string prefix ) : string |
Creates a file with a unique path in the specified directory. If the directory does not exist,
|
Method | Description | |
---|---|---|
AbsolutePath ( string path ) : string |
Merges the path with the current working directory to get a canonicalized absolute pathname representing the same path (local files only). If the provided path is absolute (rooted local path or an URL) it is returned unchanged.
|
|
GetFilename ( string path ) : string |
Returns the given filesystem url without the scheme.
|
|
GetScheme ( string path ) : string |
Wrapper-safe method of getting the schema portion from an URL.
|
|
GetUrl ( string absolutePath ) : string |
Concatenates a scheme with the given absolute path if necessary.
|
|
IsLocalFile ( string url ) : bool |
Check if the given path is a path to a local file.
|
|
IsRemoteFile ( string url ) : bool |
Check if the given path is a remote url.
|
public static basename ( string path, string suffix = null ) : string | ||
path | string | A |
suffix | string | A |
return | string |
public static dirname ( string path, int levels = 1 ) : string | ||
path | string | The full path. |
levels | int | The number of parent directories to go up. Must be greater than zero. |
return | string |
public static pathinfo ( string path, PathInfoOptions options = PathInfoOptions.All ) : |
||
path | string | The path to be parsed. |
options | PathInfoOptions | Flags determining the result. |
return |
public static realpath ( string path ) : string | ||
path | string | Arbitrary path. |
return | string |
public static tempnam ( string dir, string prefix ) : string | ||
dir | string | The directory where the temporary file should be created. |
prefix | string | The prefix of the unique path. |
return | string |