src/sys/file/SysFile.php
public static function concat($file/*, ...*/)
    {
        $args = array();
        $len = func_num_args();

        for ($i = 0; $i < $len; $i++) {
            $value = func_get_arg($i);
            $values = is_array($value)? array_values($value) : array($value);
            $args = array_merge($args, $values);
        }

        return rtrim(preg_replace("/\/+/", "/", Text::concat("/", $args)), "/");
    }
public static function concat($file/*, ...*/)
    {
        $args = array();
        $len = func_num_args();

        for ($i = 0; $i < $len; $i++) {
            $value = func_get_arg($i);
            $values = is_array($value)? array_values($value) : array($value);
            $args = array_merge($args, $values);
        }

        return rtrim(preg_replace("/\/+/", "/", Text::concat("/", $args)), "/");
    }
public static function concat ( $ file /*, ...*/ ) { $ args = array ( ) ; $ len = func_num_args ( ) ; for ( $ i = 0 ; $ i < $ len ; $ i ++ ) { $ value = func_get_arg ( $ i ) ; $ values = is_array ( $ value ) ? array_values ( $ value ) : array ( $ value ) ; $ args = array_merge ( $ args , $ values ) ; } return rtrim ( preg_replace ( "/\/+/" , "/" , Text :: concat ( "/" , $ args ) ) , "/" ) ; }
Concatenates filenames.

This function concatenates several filenames into a new one.

For example:
```php
// the next command prints "dir1/dir2/test.txt"
echo SysFile::concat("dir1", "/dir2", "test.txt");
```

@param string $file One or more files

@return string
Concatenates filenames .