Closed G4MR closed 8 years ago
Should be a simple tweak, i'll put in a PR later:
public function __construct($filePathname, $newName = null) { $desiredName = is_null($newName) ? $filePathname : $newName; $this->name = pathinfo($desiredName, PATHINFO_FILENAME); $this->directory = pathinfo($desiredName, PATHINFO_DIRNAME); $this->extension = strtolower(pathinfo($desiredName, PATHINFO_EXTENSION)); parent::__construct($filePathname); } /** * Get directory path of the current file * * @return string */ public function getDirectory() { return $this->directory; }
Edit just realized FileInfo doesn't even exist anymore.
Should be a simple tweak, i'll put in a PR later: