Skip to content

Commit

Permalink
#1 create file methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ZAYEC77 committed Jul 2, 2015
1 parent ec22f77 commit e466e8d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/components/ModuleInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,21 @@ protected function varExport($var, $indent = "")
return var_export($var, true);
}
}
}


protected function createFile($alias, $override = true)
{
$path = \Yii::getAlias($alias);
if (file_exists($path) && $override) {
@unlink($path);
}
touch($path);
}

protected function deleteFile($alias)
{
$path = \Yii::getAlias($alias);
if (file_exists($path)) {
@unlink($path);
}
}
}

0 comments on commit e466e8d

Please sign in to comment.