public static function Imce::joinPaths in IMCE 8
Same name and namespace in other branches
- 8.2 src/Imce.php \Drupal\imce\Imce::joinPaths()
Creates a fle path by joining a dirpath and a filename.
6 calls to Imce::joinPaths()
- Imce::folderInConf in src/
Imce.php - Returns predefined/inherited configuration.
- ImceFM::createUri in src/
ImceFM.php - Creates an uri from a relative path.
- ImceFolder::setPath in src/
ImceFolder.php - Sets the folder path.
- ImceItem::getPath in src/
ImceItem.php - Returns the item path relative to the root.
- Newfolder::opNewfolder in src/
Plugin/ ImcePlugin/ Newfolder.php - Operation handler: newfolder.
File
- src/
Imce.php, line 221
Class
- Imce
- Imce container class for helper methods.
Namespace
Drupal\imceCode
public static function joinPaths($dirpath, $filename) {
if ($dirpath === '.') {
return $filename;
}
if ($filename === '.') {
return $dirpath;
}
if (substr($dirpath, -1) !== '/') {
$dirpath .= '/';
}
return $dirpath . $filename;
}