创建目录函数
private function _createDestinationFolder($destinationFolder)
{
if (!$destinationFolder) {
return $this;
}
if (substr($destinationFolder, -1) == DIRECTORY_SEPARATOR) {
$destinationFolder = substr($destinationFolder, 0, -1);
}
if (!(@is_dir($destinationFolder) || @mkdir($destinationFolder, 0777, true))) {
throw new Exception("Unable to create directory '{$destinationFolder}'.");
}
return $this;
}