<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/wrappers.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'wrappers.file.php',
    1 => 'file://',
    2 => 'ローカルファイルシステムへのアクセス',
  ),
  'up' => 
  array (
    0 => 'wrappers.php',
    1 => 'サポートするプロトコル/ラッパー',
  ),
  'prev' => 
  array (
    0 => 'wrappers.php',
    1 => 'サポートするプロトコル/ラッパー',
  ),
  'next' => 
  array (
    0 => 'wrappers.http.php',
    1 => 'http://',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'language/wrappers/file.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="wrappers.file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">file://</h1>
  <p class="refpurpose"><span class="refname">file://</span> &mdash; <span class="dc-title">ローカルファイルシステムへのアクセス</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-wrappers.file-description">
  <h3 class="title">説明</h3>
  <p class="para">
   <code class="literal">file://</code> is the default wrapper used with PHP and
   represents the local filesystem.
   When a relative path is specified (a path which does not begin with
   <code class="literal">/</code>, <code class="literal">\</code>, <code class="literal">\\</code>, or a
   Windows drive letter) the path provided will be applied against the current
   working directory. In many cases this is the directory in which the script
   resides unless it has been changed. Using the <abbr title="Command Line Interpreter/Interface">CLI</abbr>
   <abbr title="Server Application Programming Interface">SAPI</abbr>, this defaults to the directory from which the
   script was called.

   PHP で使用されるデフォルトのラッパーは <em>file://</em> で、
   これはローカルファイルシステムを表します。
   相対パス(<code class="literal">/</code>, <code class="literal">\</code>, <code class="literal">\\</code>, または Windows のドライブ文字で始まらないパス)が指定された場合、
   指定されたパスは、現在の作業ディレクトリに対して適用されます。
   多くの場合、これは、スクリプトがあるディレクトリです。ただし、カレントディレクトリが
   変更されている場合を除きます。
   <abbr title="Command Line Interpreter/Interface">CLI</abbr> <abbr title="Server Application Programming Interface">SAPI</abbr> を使用した場合、このデフォルトはスクリプトがコールされたディレクトリとなります。
  </p>
  <p class="simpara">
   <span class="function"><a href="function.fopen.php" class="function">fopen()</a></span> や <span class="function"><a href="function.file-get-contents.php" class="function">file_get_contents()</a></span>
   のようないくつかの関数については、相対パスと同時に <code class="literal">include_path</code>
   も検索されます。
  </p>
 </div>


 <div class="refsect1 usage" id="refsect1-wrappers.file-usage"> 
  <h3 class="title">利用法</h3>
  <ul class="itemizedlist">
   <li class="listitem"><span class="simpara"><var class="filename">/path/to/file.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">relative/path/to/file.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">fileInCwd.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">C:/path/to/winfile.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">C:\path\to\winfile.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">\\smbserver\share\path\to\winfile.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">file:///path/to/file.ext</var></span></li>
  </ul>
 </div>
 

 <div class="refsect1 options" id="refsect1-wrappers.file-options">
  <h3 class="title">オプション</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>ラッパーの概要</strong></caption>
    
     <thead>
      <tr>
       <th>属性</th>
       <th>サポートの有無</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><a href="filesystem.configuration.php#ini.allow-url-fopen" class="link">allow_url_fopen</a> で制約される</td>
       <td>No</td>
      </tr>

      <tr>
       <td>読み込み許可</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>書き込み許可</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>追加許可</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>同時読み書き許可</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.stat.php" class="function">stat()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.unlink.php" class="function">unlink()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.rename.php" class="function">rename()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.mkdir.php" class="function">mkdir()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.rmdir.php" class="function">rmdir()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>
 

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