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);
            }
        }
    }