public function Target::getPath in Drupal 7 to 8/9 Module Upgrader 8
Returns the path to a particular file, relative to the CWD.
Parameters
string $file: The file, relative to the module root. If $file begins with a period, it will be prefixed with the module name (.module --> MODULE.module)
Return value
string
Overrides TargetInterface::getPath
File
- src/
Target.php, line 102
Class
- Target
- Default implementation of TargetInterface.
Namespace
Drupal\drupalmoduleupgraderCode
public function getPath($file) {
if ($file[0] == '.') {
$file = $this
->id() . $file;
}
return $this
->getBasePath() . '/' . ltrim($file, '/');
}