&& $file->getContent() != $arFile['content']
)
) {
+ $dir = dirname($file->getFullPath());
+ if (!is_dir($dir)) {
+ mkdir($dir, 0777, true);
+ }
file_put_contents($file->getFullPath(), $arFile['content']);
$command = $vc->getCommand('add')
->addArgument($file->getFilename())
return $prefix . $num;
}
- protected function getType($content)
+ public function getType($content)
{
$tmp = tempnam(sys_get_temp_dir(), 'phorkie-autodetect-');
file_put_contents($tmp, $content);