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

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

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

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

        return rename($source, $target);
    }
public static function rename ( $ source , $ target , $ mode = 0770 ) { $ dir = dirname ( $ target ) ; if ( ! file_exists ( $ dir ) ) { static :: mkDir ( $ dir , true , $ mode ) ; } return rename ( $ source , $ target ) ; }
Move method but it will create directory if doesn't eist

@param type $source
@param type $target
Move method but it will create directory if doesn t eist