src/Helpers/FileHelperAsc.php
public static function create($filePath, $mode = null, $time = null)
    {
        $mode = isset($mode) ? $mode : static::$fileCreateMode;
        $modeStr = static::permissionsAsString($mode);
        $time = is_int($time) ? $time : time();
        $file = static::file($filePath);
        return $file->create($modeStr, $time)
            ->then(function() use ($file, $mode) {
                return $file->chmod($mode);
            });
    }
public static function create($filePath, $mode = null, $time = null)
    {
        $mode = isset($mode) ? $mode : static::$fileCreateMode;
        $modeStr = static::permissionsAsString($mode);
        $time = is_int($time) ? $time : time();
        $file = static::file($filePath);
        return $file->create($modeStr, $time)
            ->then(function() use ($file, $mode) {
                return $file->chmod($mode);
            });
    }
Create a file
@param string $filePath
@param int|null   $mode
@param int|null   $time
@return \React\Promise\PromiseInterface