bulton-fr /
bfw-sql
| 1 | <?php |
||
| 2 | |||
| 3 | //Create src/api directory |
||
| 4 | echo ' >> Create src/models directory ... '; |
||
| 5 | |||
| 6 | if (file_exists(SRC_DIR.'models/')) { |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 7 | echo "\033[1;33mAlready exist.\033[0m"; |
||
| 8 | return; |
||
| 9 | } |
||
| 10 | |||
| 11 | if (mkdir(SRC_DIR.'models/', 0755)) { |
||
| 12 | echo "\033[1;32mCreated.\033[0m\n"; |
||
| 13 | return; |
||
| 14 | } |
||
| 15 | |||
| 16 | //If error during the directory creation |
||
| 17 | trigger_error( |
||
| 18 | 'Module '.$this->name.' install error : Fail to create /src/models/ directory', |
||
| 19 | E_USER_WARNING |
||
| 20 | ); |
||
| 21 | echo "\033[1;31mFail.\033[0m\n"; |
||
| 22 |