fakefs/classes/FakeFS/File.html
2010-12-18 14:28:01 -05:00

1578 lines
75 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>FakeFS::File</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="banner">
<h1>
<span class="type">Class</span>
FakeFS::File
<span class="parent">&lt;
StringIO
</span>
</h1>
<ul class="files">
<li><a href="../../files/lib/fakefs/file_rb.html">lib/fakefs/file.rb</a></li>
</ul>
</div>
<div id="bodyContent">
<div id="content">
<div class="sectiontitle">Methods</div>
<dl class="methods">
<dt>A</dt>
<dd>
<ul>
<li><a href="#M000100">atime</a>,</li>
<li><a href="#M000110">autoclose?</a></li>
</ul>
</dd>
<dt>B</dt>
<dd>
<ul>
<li><a href="#M000068">basename</a>,</li>
<li><a href="#M000106">binmode?</a></li>
</ul>
</dd>
<dt>C</dt>
<dd>
<ul>
<li><a href="#M000101">chmod</a>,</li>
<li><a href="#M000102">chown</a>,</li>
<li><a href="#M000107">close_on_exec=</a>,</li>
<li><a href="#M000108">close_on_exec?</a>,</li>
<li><a href="#M000061">const_missing</a>,</li>
<li><a href="#M000053">ctime</a>,</li>
<li><a href="#M000103">ctime</a></li>
</ul>
</dd>
<dt>D</dt>
<dd>
<ul>
<li><a href="#M000080">delete</a>,</li>
<li><a href="#M000062">directory?</a>,</li>
<li><a href="#M000069">dirname</a></li>
</ul>
</dd>
<dt>E</dt>
<dd>
<ul>
<li><a href="#M000051">exist?</a>,</li>
<li><a href="#M000091">exists?</a>,</li>
<li><a href="#M000067">expand_path</a>,</li>
<li><a href="#M000049">extname</a></li>
</ul>
</dd>
<dt>F</dt>
<dd>
<ul>
<li><a href="#M000066">file?</a>,</li>
<li><a href="#M000104">flock</a></li>
</ul>
</dd>
<dt>I</dt>
<dd>
<ul>
<li><a href="#M000092">ioctl</a></li>
</ul>
</dd>
<dt>J</dt>
<dd>
<ul>
<li><a href="#M000050">join</a></li>
</ul>
</dd>
<dt>L</dt>
<dd>
<ul>
<li><a href="#M000076">link</a>,</li>
<li><a href="#M000095">lstat</a>,</li>
<li><a href="#M000083">lstat</a></li>
</ul>
</dd>
<dt>M</dt>
<dd>
<ul>
<li><a href="#M000052">mtime</a>,</li>
<li><a href="#M000105">mtime</a></li>
</ul>
</dd>
<dt>N</dt>
<dd>
<ul>
<li><a href="#M000090">new</a></li>
</ul>
</dd>
<dt>R</dt>
<dd>
<ul>
<li><a href="#M000071">read</a>,</li>
<li><a href="#M000093">read_nonblock</a>,</li>
<li><a href="#M000075">readlines</a>,</li>
<li><a href="#M000070">readlink</a>,</li>
<li><a href="#M000099">readpartial</a></li>
</ul>
</dd>
<dt>S</dt>
<dd>
<ul>
<li><a href="#M000059">size</a>,</li>
<li><a href="#M000111">size</a>,</li>
<li><a href="#M000060">size?</a>,</li>
<li><a href="#M000082">stat</a>,</li>
<li><a href="#M000094">stat</a>,</li>
<li><a href="#M000081">symlink</a>,</li>
<li><a href="#M000065">symlink?</a>,</li>
<li><a href="#M000096">sysseek</a></li>
</ul>
</dd>
<dt>T</dt>
<dd>
<ul>
<li><a href="#M000097">to_io</a>,</li>
<li><a href="#M000109">to_path</a></li>
</ul>
</dd>
<dt>W</dt>
<dd>
<ul>
<li><a href="#M000098">write_nonblock</a></li>
</ul>
</dd>
</dl>
<div class="sectiontitle">Classes and Modules</div>
<ul>
<li><span class="type">CLASS</span> <a href="File/Stat.html">FakeFS::File::Stat</a></li>
</ul>
<div class="sectiontitle">Constants</div>
<table border='0' cellpadding='5'>
<tr valign='top'>
<td class="attr-name">PATH_SEPARATOR</td>
<td>=</td>
<td class="attr-value">'/'</td>
</tr>
<tr valign='top'>
<td class="attr-name">MODES</td>
<td>=</td>
<td class="attr-value">[ READ_ONLY = &quot;r&quot;, READ_WRITE = &quot;r+&quot;, WRITE_ONLY = &quot;w&quot;, READ_WRITE_TRUNCATE = &quot;w+&quot;, APPEND_WRITE_ONLY = &quot;a&quot;, APPEND_READ_WRITE = &quot;a+&quot; ]</td>
</tr>
<tr valign='top'>
<td class="attr-name">FILE_CREATION_MODES</td>
<td>=</td>
<td class="attr-value">MODES - [READ_ONLY, READ_WRITE]</td>
</tr>
<tr valign='top'>
<td class="attr-name">MODE_BITMASK</td>
<td>=</td>
<td class="attr-value">RealFile::RDONLY | RealFile::WRONLY | RealFile::RDWR | RealFile::APPEND | RealFile::CREAT | RealFile::EXCL | RealFile::NONBLOCK | RealFile::TRUNC | RealFile::NOCTTY | RealFile::SYNC</td>
</tr>
<tr valign='top'>
<td class="attr-name">FILE_CREATION_BITMASK</td>
<td>=</td>
<td class="attr-value">RealFile::CREAT</td>
</tr>
</table>
<div class="sectiontitle">Attributes</div>
<table border='0' cellpadding='5'>
<tr valign='top'>
<td class='attr-rw'>
[R]
</td>
<td class='attr-name'>path</td>
<td class='attr-desc'></td>
</tr>
</table>
<div class="sectiontitle">Class Public methods</div>
<div class="method">
<div class="title" id="M000068">
<a name="M000068"></a><b>basename</b>(*args)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L113" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000068_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 113</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-constant">RealFile</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000061">
<a name="M000061"></a><b>const_missing</b>(name)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000061_source')" id="l_M000061_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L79" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000061_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 79</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">const_missing</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-constant">RealFile</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000053">
<a name="M000053"></a><b>ctime</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000053_source')" id="l_M000053_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L59" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000053_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 59</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ctime</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">ctime</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000080">
<a name="M000080"></a><b>delete</b>(file_name, *additional_file_names)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000080_source')" id="l_M000080_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L159" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000080_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 159</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">additional_file_names</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">file_name</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>, <span class="ruby-node">&quot;No such file or directory - #{file_name}&quot;</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span>(<span class="ruby-identifier">file_name</span>)
<span class="ruby-identifier">additional_file_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file_name</span><span class="ruby-operator">|</span>
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span>(<span class="ruby-identifier">file_name</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">additional_file_names</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000062">
<a name="M000062"></a><b>directory?</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L83" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000062_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 83</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:entry</span>
<span class="ruby-identifier">path</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">FakeDir</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">result</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-identifier">result</span> <span class="ruby-value">? </span><span class="ruby-identifier">result</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">FakeDir</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000069">
<a name="M000069"></a><b>dirname</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L117" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000069_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 117</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-constant">RealFile</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000051">
<a name="M000051"></a><b>exist?</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000051_source')" id="l_M000051_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L39" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000051_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 39</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000067">
<a name="M000067"></a><b>expand_path</b>(*args)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L109" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000067_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 109</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-constant">RealFile</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000049">
<a name="M000049"></a><b>extname</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L31" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000049_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 31</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-constant">RealFile</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000066">
<a name="M000066"></a><b>file?</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L100" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000066_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 100</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:entry</span>
<span class="ruby-identifier">path</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">FakeFile</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">result</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-identifier">result</span> <span class="ruby-value">? </span><span class="ruby-identifier">result</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">FakeFile</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000050">
<a name="M000050"></a><b>join</b>(*parts)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000050_source')" id="l_M000050_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L35" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000050_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 35</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">join</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">parts</span>)
<span class="ruby-identifier">parts</span> <span class="ruby-operator">*</span> <span class="ruby-constant">PATH_SEPARATOR</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000076">
<a name="M000076"></a><b>link</b>(source, dest)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L139" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000076_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 139</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">link</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">dest</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">source</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPERM</span>, <span class="ruby-node">&quot;Operation not permitted - #{source} or #{dest}&quot;</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">source</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>, <span class="ruby-node">&quot;No such file or directory - #{source} or #{dest}&quot;</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">dest</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EEXIST</span>, <span class="ruby-node">&quot;File exists - #{source} or #{dest}&quot;</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">source</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">source</span>)
<span class="ruby-identifier">dest</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">dest</span>, <span class="ruby-identifier">source</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">clone</span>)
<span class="ruby-identifier">source</span>.<span class="ruby-identifier">link</span>(<span class="ruby-identifier">dest</span>)
<span class="ruby-value">0</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000083">
<a name="M000083"></a><b>lstat</b>(file)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000083_source')" id="l_M000083_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L185" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000083_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 185</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lstat</span>(<span class="ruby-identifier">file</span>)
<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">Stat</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file</span>, <span class="ruby-keyword kw">true</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000052">
<a name="M000052"></a><b>mtime</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000052_source')" id="l_M000052_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L51" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000052_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 51</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">mtime</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000090">
<a name="M000090"></a><b>new</b>(path, mode = READ_ONLY, perm = nil)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L227" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000090_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 227</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span> = <span class="ruby-constant">READ_ONLY</span>, <span class="ruby-identifier">perm</span> = <span class="ruby-keyword kw">nil</span>)
<span class="ruby-ivar">@path</span> = <span class="ruby-identifier">path</span>
<span class="ruby-ivar">@mode</span> = <span class="ruby-identifier">mode</span>
<span class="ruby-ivar">@file</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-ivar">@autoclose</span> = <span class="ruby-keyword kw">true</span>
<span class="ruby-identifier">check_modes!</span>
<span class="ruby-identifier">file_creation_mode?</span> <span class="ruby-value">? </span><span class="ruby-identifier">create_missing_file</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">check_file_existence!</span>
<span class="ruby-keyword kw">super</span>(<span class="ruby-ivar">@file</span>.<span class="ruby-identifier">content</span>, <span class="ruby-identifier">mode</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000071">
<a name="M000071"></a><b>read</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L126" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000071_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 126</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-identifier">file</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">exists?</span>
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000075">
<a name="M000075"></a><b>readlines</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000075_source')" id="l_M000075_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L135" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000075_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 135</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">readlines</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000070">
<a name="M000070"></a><b>readlink</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L121" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000070_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 121</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">readlink</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-identifier">symlink</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">symlink</span>.<span class="ruby-identifier">target</span>).<span class="ruby-identifier">to_s</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000059">
<a name="M000059"></a><b>size</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000059_source')" id="l_M000059_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L67" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000059_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 67</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">length</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000060">
<a name="M000060"></a><b>size?</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000060_source')" id="l_M000060_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L71" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000060_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 71</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">size?</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">size</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">zero?</span>
<span class="ruby-keyword kw">true</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-keyword kw">nil</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000082">
<a name="M000082"></a><b>stat</b>(file)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000082_source')" id="l_M000082_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L181" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000082_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 181</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">file</span>)
<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">Stat</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000081">
<a name="M000081"></a><b>symlink</b>(source, dest)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000081_source')" id="l_M000081_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L177" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000081_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 177</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">symlink</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">dest</span>)
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">ln_s</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">dest</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000065">
<a name="M000065"></a><b>symlink?</b>(path)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L92" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000065_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 92</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:entry</span>
<span class="ruby-identifier">path</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">FakeSymlink</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">FakeSymlink</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000100">
<a name="M000100"></a><b>atime</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000100_source')" id="l_M000100_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L290" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000100_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 290</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atime</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000110">
<a name="M000110"></a><b>autoclose?</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000110_source')" id="l_M000110_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L335" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000110_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 335</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">autoclose?</span>
<span class="ruby-ivar">@autoclose</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000106">
<a name="M000106"></a><b>binmode?</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L315" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000106_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 315</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">binmode?</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000101">
<a name="M000101"></a><b>chmod</b>(mode_int)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000101_source')" id="l_M000101_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L294" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000101_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 294</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chmod</span>(<span class="ruby-identifier">mode_int</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000102">
<a name="M000102"></a><b>chown</b>(owner_int, group_int)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000102_source')" id="l_M000102_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L298" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000102_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 298</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chown</span>(<span class="ruby-identifier">owner_int</span>, <span class="ruby-identifier">group_int</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000107">
<a name="M000107"></a><b>close_on_exec=</b>(bool)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000107_source')" id="l_M000107_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L319" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000107_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 319</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close_on_exec=</span>(<span class="ruby-identifier">bool</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000108">
<a name="M000108"></a><b>close_on_exec?</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000108_source')" id="l_M000108_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L323" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000108_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 323</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close_on_exec?</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000103">
<a name="M000103"></a><b>ctime</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L302" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000103_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 302</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ctime</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">ctime</span>(<span class="ruby-ivar">@path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000091">
<a name="M000091"></a><b>exists?</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000091_source')" id="l_M000091_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L240" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000091_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 240</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exists?</span>
<span class="ruby-keyword kw">true</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000104">
<a name="M000104"></a><b>flock</b>(locking_constant)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L306" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000104_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 306</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">flock</span>(<span class="ruby-identifier">locking_constant</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000092">
<a name="M000092"></a><b>ioctl</b>(integer_cmd, arg)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000092_source')" id="l_M000092_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L255" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000092_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 255</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ioctl</span>(<span class="ruby-identifier">integer_cmd</span>, <span class="ruby-identifier">arg</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000095">
<a name="M000095"></a><b>lstat</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L267" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000095_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 267</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lstat</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">lstat</span>(<span class="ruby-ivar">@path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000105">
<a name="M000105"></a><b>mtime</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L310" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000105_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 310</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mtime</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-ivar">@path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000093">
<a name="M000093"></a><b>read_nonblock</b>(maxlen, outbuf = nil)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L259" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000093_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 259</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_nonblock</span>(<span class="ruby-identifier">maxlen</span>, <span class="ruby-identifier">outbuf</span> = <span class="ruby-keyword kw">nil</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000099">
<a name="M000099"></a><b>readpartial</b>(maxlen, outbuf = nil)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000099_source')" id="l_M000099_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L286" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000099_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 286</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">maxlen</span>, <span class="ruby-identifier">outbuf</span> = <span class="ruby-keyword kw">nil</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000111">
<a name="M000111"></a><b>size</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L341" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000111_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 341</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span>
<span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-ivar">@path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000094">
<a name="M000094"></a><b>stat</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L263" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000094_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 263</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stat</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-ivar">@path</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000096">
<a name="M000096"></a><b>sysseek</b>(position, whence = SEEK_SET)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L271" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000096_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 271</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sysseek</span>(<span class="ruby-identifier">position</span>, <span class="ruby-identifier">whence</span> = <span class="ruby-constant">SEEK_SET</span>)
<span class="ruby-identifier">seek</span>(<span class="ruby-identifier">position</span>, <span class="ruby-identifier">whence</span>)
<span class="ruby-identifier">pos</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000097">
<a name="M000097"></a><b>to_io</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000097_source')" id="l_M000097_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L278" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000097_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 278</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_io</span>
<span class="ruby-keyword kw">self</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000109">
<a name="M000109"></a><b>to_path</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000109_source')" id="l_M000109_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L327" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000109_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 327</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_path</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000098">
<a name="M000098"></a><b>write_nonblock</b>(string)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">show</a>
| <a href="http://github.com/defunkt/fakefs/blob/82db05e85d1a486fbdb671af4b1d93085e515c82/lib/fakefs/file.rb#L282" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000098_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 282</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_nonblock</span>(<span class="ruby-identifier">string</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
</div>
</div>
</body>
</html>