public static function rename($source, $target, $mode = 0770)
    {
        $dir = dirname($target);

        if (!file_exists($dir)) {
            static::mkDir($dir, true, $mode);
        }

        return rename($source, $target);
    }