public static function makeFile($file, $chmod = 0777, $touchTime = null)
    {
        if (!file_exists($file)) {
            if (!is_dir(dirname($file))) {
                mkdir(dirname($file), 0777, true);
            }
            $h = fopen($file, 'w');
            if ($h) {
                fclose($h);
            }
            unset($h);
            if (null !== $touchTime) {
                touch($file, $touchTime);
            }
        }
    }
public static function makeFile($file, $chmod = 0777, $touchTime = null)
    {
        if (!file_exists($file)) {
            if (!is_dir(dirname($file))) {
                mkdir(dirname($file), 0777, true);
            }
            $h = fopen($file, 'w');
            if ($h) {
                fclose($h);
            }
            unset($h);
            if (null !== $touchTime) {
                touch($file, $touchTime);
            }
        }
    }
public static function makeFile ( $ file , $ chmod = 0777 , $ touchTime = null ) { if ( ! file_exists ( $ file ) ) { if ( ! is_dir ( dirname ( $ file ) ) ) { mkdir ( dirname ( $ file ) , 0777 , true ) ; } $ h = fopen ( $ file , 'w' ) ; if ( $ h ) { fclose ( $ h ) ; } unset ( $ h ) ; if ( null !== $ touchTime ) { touch ( $ file , $ touchTime ) ; } } }
Recursively generate directories if not existent and place a empty file inside it.

@param  string  $file      full path to the required file
@param  integer $chmod     chmod for the generated folders
@param  integer $touchTime timestamp for the filemtime
@return null
Recursively generate directories if not existent and place a empty file inside it .