Prepares the passed path to work on the actual OS.
public static prepareOsSpecificPath ( string $path ) : string | ||
$path | string | The path we want to perpare |
return | string | The prepared path |
/** * Prepares the passed directory if necessary. * * @param string $directory The directory to prepare * @param integer $mode The mode of the directory * * @return void */ public static function prepareDirectory($directory, $mode = 0775) { // make the passed directory OS compliant $toBePreapared = Setup::prepareOsSpecificPath($directory); // make sure the directory exists if (is_dir(dirname($toBePreapared)) === false) { mkdir(dirname($toBePreapared), $mode, true); } }