<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.svn.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.svn-import.php',
    1 => 'svn_import',
    2 => 'Imports an unversioned path into a repository',
  ),
  'up' => 
  array (
    0 => 'ref.svn.php',
    1 => 'SVN Functions',
  ),
  'prev' => 
  array (
    0 => 'function.svn-fs-youngest-rev.php',
    1 => 'svn_fs_youngest_rev',
  ),
  'next' => 
  array (
    0 => 'function.svn-log.php',
    1 => 'svn_log',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/svn/functions/svn-import.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.svn-import" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">svn_import</h1>
  <p class="verinfo">(PECL svn &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">svn_import</span> &mdash; <span class="dc-title">Imports an unversioned path into a repository</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.svn-import-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>svn_import</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$path</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$url</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$nonrecursive</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Commits unversioned <code class="parameter">path</code> into repository at
   <code class="parameter">url</code>. If <code class="parameter">path</code> is a
   directory and <code class="parameter">nonrecursive</code> is <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>,
   the directory will be imported recursively.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.svn-import-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">path</code></dt>
    <dd>
     <span class="simpara">
      Path of file or directory to import.
     </span>
     <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script&#039;s working directory, use <span class="function"><a href="function.realpath.php" class="function">realpath()</a></span> or dirname(__FILE__).</span></p></blockquote>
    </dd>
   
   
    <dt><code class="parameter">url</code></dt>
    <dd>
     <span class="simpara">
      Repository URL to import into.
     </span>
    </dd>
   
   
    <dt><code class="parameter">nonrecursive</code></dt>
    <dd>
     <span class="simpara">
      Whether or not to refrain from recursively processing directories.
     </span>
    </dd>
   
  </dl>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.svn-import-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="simpara">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 

 

 <div class="refsect1 examples" id="refsect1-function.svn-import-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 Basic example</strong></p>
   <div class="example-contents"><p>
    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:
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />svn_import</span><span style="color: #007700">(</span><span style="color: #0000BB">realpath</span><span style="color: #007700">(</span><span style="color: #DD0000">'new-files'</span><span style="color: #007700">), </span><span style="color: #DD0000">'http://www.example.com/svnroot/incoming/abc'</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.svn-import-notes">
  <h3 class="title">Notes</h3>
  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is
<em>EXPERIMENTAL</em>. The behaviour of this function, its name, and
surrounding documentation may change without notice in a future release of PHP.
This function should be used at your own risk.
</p></div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.svn-import-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.svn-add.php" class="function" rel="rdfs-seeAlso">svn_add()</a> - Schedules the addition of an item in a working directory</span></li>
   <li><a href="http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.import.html" class="link external">&raquo;&nbsp;SVN documentation for svn import</a></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>