/** * * Construct a directory instance, using a path relative to PIOL_ROOT_PATH. * * @param string $path the path of this directory, relative to PIOL_ROOT_PATH as a root. * * @api */ public function __construct($path) { if ($path == "") { $path = DS; } //replace \ with / $new_path = str_replace("\\", DS, $path); if (substr($new_path, strlen($new_path) - 1, 1) != DS) { $new_path = $new_path . DS; } parent::__construct($new_path); }
/** * * Construct a \Mbcraft\Piol\File instance. * * @param string $path The path of the file. * * @api */ public function __construct($path) { parent::__construct($path); }
function __construct($path) { $new_path = str_replace("\\", DS, $path); parent::__construct($new_path); }