php8.5
Home/ Manual/ svn / functions/ svn_import

svn_import

PHP function Edit on GitHub ✎

(PECL svn >= 0.2.0)

Imports an unversioned path into a repository

Description

svn_import(string $path, string $url, bool $nonrecursive): bool

Commits unversioned path into repository at url. If path is a directory and nonrecursive is false, the directory will be imported recursively.

Parameters

path

Path of file or directory to import.

Relativepath

url

Repository URL to import into.

nonrecursive

Whether or not to refrain from recursively processing directories.

Return Values

Success

Examples

Basic example

This example demonstrates a basic use-case of this function. To import a directory named new-files into the repository at http://www.example.com/svnroot/incoming/abc, use:

php
<?php
svn_import(realpath('new-files'), 'http://www.example.com/svnroot/incoming/abc', false);
?>

Notes Func

See Also

Source: reference/svn/functions/svn-import.xml · from the official PHP manual (php/doc-en)