<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.svn-checkout.php',
    1 => 'svn_checkout',
    2 => 'リポジトリから作業コピーをチェックアウトする',
  ),
  'up' => 
  array (
    0 => 'ref.svn.php',
    1 => 'SVN 関数',
  ),
  'prev' => 
  array (
    0 => 'function.svn-cat.php',
    1 => 'svn_cat',
  ),
  'next' => 
  array (
    0 => 'function.svn-cleanup.php',
    1 => 'svn_cleanup',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/svn/functions/svn-checkout.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.svn-checkout" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">svn_checkout</h1>
  <p class="verinfo">(PECL svn &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">svn_checkout</span> &mdash; <span class="dc-title">リポジトリから作業コピーをチェックアウトする</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.svn-checkout-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>svn_checkout</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$repos</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$targetpath</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$revision</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   <code class="parameter">repos</code> にあるリポジトリの
   リビジョン <code class="parameter">revision</code> を、
   <code class="parameter">targetpath</code> の作業コピーにチェックアウトします。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.svn-checkout-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">repos</code></dt>
    <dd>
     <span class="simpara">
      チェックアウトしたいリポジトリ内のディレクトリを表す URL 文字列。
     </span>
    </dd>
   
   
    <dt><code class="parameter">targetpath</code></dt>
    <dd>
     <span class="simpara">
      チェックアウト先ディレクトリのローカルパス。
     </span>
     <blockquote class="note"><p><strong class="note">注意</strong>: <span class="simpara">相対パスは、PHP バイナリが存在するディレクトリを基準として解決されます。呼び出しもとのスクリプトの作業ディレクトリを基準とするには、<span class="function"><a href="function.realpath.php" class="function">realpath()</a></span> あるいは dirname(__FILE__) を使用してください。</span></p></blockquote>
    </dd>
   
   
    <dt><code class="parameter">revision</code></dt>
    <dd>
     <span class="simpara">
      チェックアウトしたいリビジョン番号を表す整数値。デフォルトは HEAD
      リビジョンで、これは最新のリビジョンを表します。
     </span>
    </dd>
   
   
    <dt><code class="parameter">flags</code></dt>
    <dd>
     <span class="simpara">
      <strong><code>SVN_NON_RECURSIVE</code></strong> および
      <strong><code>SVN_IGNORE_EXTERNALS</code></strong> の任意の組み合わせ。
     </span>
    </dd>
   
  </dl>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.svn-checkout-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="simpara">
   成功した場合に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を、失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 

 

 <div class="refsect1 examples" id="refsect1-function.svn-checkout-examples">
  <h3 class="title">例</h3>
  <div class="example" id="example-1">
   <p><strong>例1 基本的な例</strong></p>
   <div class="example-contents"><p>
    この例は、リポジトリ内のディレクトリを
    calc という名前のローカルディレクトリにチェックアウトします。
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />svn_checkout</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.example.com/svnroot/calc/trunk'</span><span style="color: #007700">, </span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">) . </span><span style="color: #DD0000">'/calc'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>
    <code class="literal">dirname(__FILE__)</code> を使用して、
    相対パス calc を絶対パスに変換する必要があります。
    もし calc ディレクトリが存在するのなら、
    <span class="function"><a href="function.realpath.php" class="function">realpath()</a></span> を使って絶対パスを取得することもできます。
   </p></div>
  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.svn-checkout-notes">
  <h3 class="title">注意</h3>
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">この関数は、
<em>実験的</em> なものです。この関数の動作・
名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP
のリリースにおいて変更される可能性があります。
この関数は自己責任で使用してください。</p></div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.svn-checkout-seealso">
  <h3 class="title">参考</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><span class="function"><a href="function.svn-commit.php" class="function" rel="rdfs-seeAlso">svn_commit()</a> - Sends changes from the local working copy to the repository</span></li>
   <li><span class="function"><a href="function.svn-status.php" class="function" rel="rdfs-seeAlso">svn_status()</a> - Returns the status of working copy files and directories</span></li>
   <li><span class="function"><a href="function.svn-update.php" class="function" rel="rdfs-seeAlso">svn_update()</a> - Update working copy</span></li>
   <li><a href="http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.checkout.html" class="link external">&raquo;&nbsp;SVN ドキュメントの svn checkout</a></li>
  </ul>
 </div>


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