update docs
This commit is contained in:
parent
bda25083fc
commit
1743731e43
@ -35,6 +35,8 @@
|
||||
|
||||
<li><a href="../files/lib/fakefs/file_system_rb.html">lib/fakefs/file_system.rb</a></li>
|
||||
|
||||
<li><a href="../files/lib/fakefs/file_test_rb.html">lib/fakefs/file_test.rb</a></li>
|
||||
|
||||
<li><a href="../files/lib/fakefs/fileutils_rb.html">lib/fakefs/fileutils.rb</a></li>
|
||||
|
||||
<li><a href="../files/lib/fakefs/spec_helpers_rb.html">lib/fakefs/spec_helpers.rb</a></li>
|
||||
@ -104,6 +106,8 @@
|
||||
|
||||
<li><span class="type">CLASS</span> <a href="FakeFS/File.html">FakeFS::File</a></li>
|
||||
|
||||
<li><span class="type">CLASS</span> <a href="FakeFS/FileTest.html">FakeFS::FileTest</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@ -128,20 +132,22 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000000_source')" id="l_M000000_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/7444ef50b3ffbb8a534182b2a3af6a0b6073b32f/lib/fakefs/base.rb#L8" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000000_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/base.rb, line 8</span>
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/base.rb, line 7</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">activate!</span>
|
||||
<span class="ruby-constant">Object</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:Dir</span>)
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:File</span>)
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:FileTest</span>)
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:FileUtils</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:Dir</span>, <span class="ruby-constant">FakeFS</span><span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:File</span>, <span class="ruby-constant">FakeFS</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>)
|
||||
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:Dir</span>, <span class="ruby-constant">FakeFS</span><span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:File</span>, <span class="ruby-constant">FakeFS</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:FileUtils</span>, <span class="ruby-constant">FakeFS</span><span class="ruby-operator">::</span><span class="ruby-constant">FileUtils</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:FileTest</span>, <span class="ruby-constant">FakeFS</span><span class="ruby-operator">::</span><span class="ruby-constant">FileTest</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
@ -162,20 +168,22 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/7444ef50b3ffbb8a534182b2a3af6a0b6073b32f/lib/fakefs/base.rb#L19" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000001_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/base.rb, line 19</span>
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/base.rb, line 22</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">deactivate!</span>
|
||||
<span class="ruby-constant">Object</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:Dir</span>)
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:File</span>)
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:FileTest</span>)
|
||||
<span class="ruby-identifier">remove_const</span>(<span class="ruby-identifier">:FileUtils</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:Dir</span>, <span class="ruby-constant">RealDir</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:File</span>, <span class="ruby-constant">RealFile</span>)
|
||||
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:Dir</span>, <span class="ruby-constant">RealDir</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:File</span>, <span class="ruby-constant">RealFile</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:FileTest</span>, <span class="ruby-constant">RealFileTest</span>)
|
||||
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">:FileUtils</span>, <span class="ruby-constant">RealFileUtils</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">true</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -62,7 +62,7 @@
|
||||
|
||||
<li><a href="#M000014">chroot</a>,</li>
|
||||
|
||||
<li><a href="#M000004">close</a></li>
|
||||
<li><a href="#M000003">close</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -118,7 +118,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000003">new</a></li>
|
||||
<li><a href="#M000002">new</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -127,7 +127,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000024">open</a></li>
|
||||
<li><a href="#M000020">open</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -142,7 +142,7 @@
|
||||
|
||||
<li><a href="#M000008">pos=</a>,</li>
|
||||
|
||||
<li><a href="#M000026">pwd</a></li>
|
||||
<li><a href="#M000022">pwd</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -171,7 +171,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000025">tmpdir</a></li>
|
||||
<li><a href="#M000021">tmpdir</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -218,8 +218,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L55" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000012_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 55</span>
|
||||
@ -245,8 +243,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L59" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000013_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 59</span>
|
||||
@ -272,8 +268,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L63" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000014_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 63</span>
|
||||
@ -299,8 +293,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L67" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000015_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 67</span>
|
||||
@ -327,8 +319,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L72" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000016_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 72</span>
|
||||
@ -355,8 +345,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L77" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000017_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 77</span>
|
||||
@ -382,8 +370,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L81" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000018_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 81</span>
|
||||
@ -409,8 +395,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L85" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000019_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 85</span>
|
||||
@ -418,6 +402,7 @@
|
||||
<span class="ruby-identifier">parent</span> = <span class="ruby-identifier">string</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>)
|
||||
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">pop</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">"No such file or directory - #{string}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">join</span> <span class="ruby-operator">==</span> <span class="ruby-value str">""</span> <span class="ruby-operator">||</span> <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'/'</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">"File exists - #{string}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">string</span>)
|
||||
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">string</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
@ -426,9 +411,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000003">
|
||||
<div class="title" id="M000002">
|
||||
|
||||
<a name="M000003"></a><b>new</b>(string)
|
||||
<a name="M000002"></a><b>new</b>(string)
|
||||
|
||||
</div>
|
||||
|
||||
@ -437,12 +422,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L5" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000003_source" class="dyn-source">
|
||||
<div id="M000002_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 5</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">string</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-identifier">string</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">string</span>)
|
||||
@ -457,9 +440,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000024">
|
||||
<div class="title" id="M000020">
|
||||
|
||||
<a name="M000024"></a><b>open</b>(string, &block)
|
||||
<a name="M000020"></a><b>open</b>(string, &block)
|
||||
|
||||
</div>
|
||||
|
||||
@ -468,13 +451,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L92" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000024_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 92</span>
|
||||
<div id="M000020_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 93</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">string</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
||||
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">string</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">file</span>) }
|
||||
@ -488,9 +469,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000026">
|
||||
<div class="title" id="M000022">
|
||||
|
||||
<a name="M000026"></a><b>pwd</b>()
|
||||
<a name="M000022"></a><b>pwd</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -499,13 +480,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L104" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000026_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 104</span>
|
||||
<div id="M000022_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 105</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">pwd</span>
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">current_dir</span>.<span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -515,9 +494,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000025">
|
||||
<div class="title" id="M000021">
|
||||
|
||||
<a name="M000025"></a><b>tmpdir</b>()
|
||||
<a name="M000021"></a><b>tmpdir</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -526,13 +505,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L100" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000025_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 100</span>
|
||||
<div id="M000021_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 101</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">tmpdir</span>
|
||||
<span class="ruby-value str">'/tmp'</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -544,9 +521,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000004">
|
||||
<div class="title" id="M000003">
|
||||
|
||||
<a name="M000004"></a><b>close</b>()
|
||||
<a name="M000003"></a><b>close</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -555,12 +532,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L13" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000004_source" class="dyn-source">
|
||||
<div id="M000003_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 13</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
||||
<span class="ruby-ivar">@open</span> = <span class="ruby-keyword kw">false</span>
|
||||
@ -587,8 +562,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L20" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000005_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 20</span>
|
||||
@ -616,8 +589,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L26" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000006_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 26</span>
|
||||
@ -643,8 +614,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L30" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000007_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 30</span>
|
||||
@ -670,8 +639,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L34" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000008_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 34</span>
|
||||
@ -697,8 +664,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L38" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000009_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 38</span>
|
||||
@ -727,8 +692,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L45" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000010_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 45</span>
|
||||
@ -754,8 +717,6 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/838274f965d5a9182f424c5bdbcbf58f2bc08be6/lib/fakefs/dir.rb#L49" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000011_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/dir.rb, line 49</span>
|
||||
|
@ -49,7 +49,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000023">clone</a></li>
|
||||
<li><a href="#M000026">clone</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -67,7 +67,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000021">entry</a></li>
|
||||
<li><a href="#M000024">entry</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -76,7 +76,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000022">inspect</a></li>
|
||||
<li><a href="#M000025">inspect</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -85,7 +85,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000020">new</a></li>
|
||||
<li><a href="#M000023">new</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -130,46 +130,32 @@
|
||||
<td class='attr-desc'></td>
|
||||
</tr>
|
||||
|
||||
<tr valign='top'>
|
||||
<td class='attr-rw'>
|
||||
[R]
|
||||
</td>
|
||||
<td class='attr-name'>ctime</td>
|
||||
<td class='attr-desc'></td>
|
||||
</tr>
|
||||
|
||||
<tr valign='top'>
|
||||
<td class='attr-rw'>
|
||||
[R]
|
||||
</td>
|
||||
<td class='attr-name'>mtime</td>
|
||||
<td class='attr-desc'></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div class="sectiontitle">Class Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000020">
|
||||
|
||||
<a name="M000020"></a><b>new</b>(name = nil, parent = nil)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/dir.rb#L5" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000020_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 5</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">parent</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
||||
<span class="ruby-ivar">@parent</span> = <span class="ruby-identifier">parent</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="M000023">
|
||||
|
||||
<a name="M000023"></a><b>clone</b>(parent = nil)
|
||||
<a name="M000023"></a><b>new</b>(name = nil, parent = nil)
|
||||
|
||||
</div>
|
||||
|
||||
@ -180,11 +166,39 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/dir.rb#L18" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000023_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 18</span>
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 6</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">parent</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
||||
<span class="ruby-ivar">@parent</span> = <span class="ruby-identifier">parent</span>
|
||||
<span class="ruby-ivar">@ctime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
||||
<span class="ruby-ivar">@mtime</span> = <span class="ruby-ivar">@ctime</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="M000026">
|
||||
|
||||
<a name="M000026"></a><b>clone</b>(parent = nil)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000026_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 21</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>(<span class="ruby-identifier">parent</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">clone</span> = <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-keyword kw">self</span>))
|
||||
<span class="ruby-identifier">clone</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
||||
@ -212,11 +226,9 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/dir.rb#L37" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000028_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 37</span>
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 40</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">node</span> = <span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>
|
||||
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-keyword kw">self</span>)
|
||||
@ -230,9 +242,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000021">
|
||||
<div class="title" id="M000024">
|
||||
|
||||
<a name="M000021"></a><b>entry</b>()
|
||||
<a name="M000024"></a><b>entry</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -241,13 +253,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/dir.rb#L10" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000021_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 10</span>
|
||||
<div id="M000024_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 13</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entry</span>
|
||||
<span class="ruby-keyword kw">self</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -257,9 +267,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000022">
|
||||
<div class="title" id="M000025">
|
||||
|
||||
<a name="M000022"></a><b>inspect</b>()
|
||||
<a name="M000025"></a><b>inspect</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -268,13 +278,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/dir.rb#L14" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000022_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 14</span>
|
||||
<div id="M000025_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 17</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
||||
<span class="ruby-node">"(FakeDir name:#{name.inspect} parent:#{parent.to_s.inspect} size:#{size})"</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -297,11 +305,9 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/dir.rb#L27" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000027_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 27</span>
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/dir.rb, line 30</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parent</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'.'</span>
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">name</span>)
|
||||
|
@ -49,11 +49,11 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000044">clone</a>,</li>
|
||||
<li><a href="#M000038">clone</a>,</li>
|
||||
|
||||
<li><a href="#M000040">content</a>,</li>
|
||||
<li><a href="#M000034">content</a>,</li>
|
||||
|
||||
<li><a href="#M000041">content=</a></li>
|
||||
<li><a href="#M000035">content=</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -62,7 +62,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000048">delete</a></li>
|
||||
<li><a href="#M000042">delete</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -71,7 +71,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000045">entry</a></li>
|
||||
<li><a href="#M000039">entry</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -80,7 +80,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000046">inspect</a></li>
|
||||
<li><a href="#M000040">inspect</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -89,9 +89,9 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000043">link</a>,</li>
|
||||
<li><a href="#M000037">link</a>,</li>
|
||||
|
||||
<li><a href="#M000042">links</a></li>
|
||||
<li><a href="#M000036">links</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -100,7 +100,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000037">new</a></li>
|
||||
<li><a href="#M000033">new</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -109,7 +109,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000047">to_s</a></li>
|
||||
<li><a href="#M000041">to_s</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -162,7 +162,15 @@
|
||||
|
||||
<tr valign='top'>
|
||||
<td class='attr-rw'>
|
||||
[RW]
|
||||
[R]
|
||||
</td>
|
||||
<td class='attr-name'>ctime</td>
|
||||
<td class='attr-desc'></td>
|
||||
</tr>
|
||||
|
||||
<tr valign='top'>
|
||||
<td class='attr-rw'>
|
||||
[R]
|
||||
</td>
|
||||
<td class='attr-name'>mtime</td>
|
||||
<td class='attr-desc'></td>
|
||||
@ -183,9 +191,9 @@
|
||||
<div class="sectiontitle">Class Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000037">
|
||||
<div class="title" id="M000033">
|
||||
|
||||
<a name="M000037"></a><b>new</b>(name = nil, parent = nil)
|
||||
<a name="M000033"></a><b>new</b>(name = nil, parent = nil)
|
||||
|
||||
</div>
|
||||
|
||||
@ -194,18 +202,17 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L30" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000037_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 30</span>
|
||||
<div id="M000033_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 31</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">parent</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
||||
<span class="ruby-ivar">@parent</span> = <span class="ruby-identifier">parent</span>
|
||||
<span class="ruby-ivar">@inode</span> = <span class="ruby-constant">Inode</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-ivar">@mtime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
||||
<span class="ruby-ivar">@ctime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
||||
<span class="ruby-ivar">@mtime</span> = <span class="ruby-ivar">@ctime</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
@ -215,9 +222,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000044">
|
||||
<div class="title" id="M000038">
|
||||
|
||||
<a name="M000044"></a><b>clone</b>(parent = nil)
|
||||
<a name="M000038"></a><b>clone</b>(parent = nil)
|
||||
|
||||
</div>
|
||||
|
||||
@ -226,13 +233,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L55" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000044_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 55</span>
|
||||
<div id="M000038_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 57</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>(<span class="ruby-identifier">parent</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
<span class="ruby-identifier">clone</span> = <span class="ruby-keyword kw">super</span>()
|
||||
<span class="ruby-identifier">clone</span>.<span class="ruby-identifier">parent</span> = <span class="ruby-identifier">parent</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parent</span>
|
||||
@ -245,9 +250,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000040">
|
||||
<div class="title" id="M000034">
|
||||
|
||||
<a name="M000040"></a><b>content</b>()
|
||||
<a name="M000034"></a><b>content</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -256,13 +261,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L39" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000040_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 39</span>
|
||||
<div id="M000034_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 41</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content</span>
|
||||
<span class="ruby-ivar">@inode</span>.<span class="ruby-identifier">content</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -272,9 +275,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000041">
|
||||
<div class="title" id="M000035">
|
||||
|
||||
<a name="M000041"></a><b>content=</b>(str)
|
||||
<a name="M000035"></a><b>content=</b>(str)
|
||||
|
||||
</div>
|
||||
|
||||
@ -283,13 +286,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L43" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000041_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 43</span>
|
||||
<div id="M000035_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 45</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content=</span>(<span class="ruby-identifier">str</span>)
|
||||
<span class="ruby-ivar">@inode</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">str</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -298,119 +299,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000048">
|
||||
|
||||
<a name="M000048"></a><b>delete</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L74" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000048_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 74</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>
|
||||
<span class="ruby-identifier">inode</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">delete</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="M000045">
|
||||
|
||||
<a name="M000045"></a><b>entry</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L62" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000045_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 62</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entry</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="M000046">
|
||||
|
||||
<a name="M000046"></a><b>inspect</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L66" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000046_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 66</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
||||
<span class="ruby-node">"(FakeFile name:#{name.inspect} parent:#{parent.to_s.inspect} size:#{content.size})"</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000043">
|
||||
|
||||
<a name="M000043"></a><b>link</b>(other_file)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L51" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000043_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 51</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link</span>(<span class="ruby-identifier">other_file</span>)
|
||||
<span class="ruby-ivar">@inode</span>.<span class="ruby-identifier">link</span>(<span class="ruby-identifier">other_file</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000042">
|
||||
|
||||
<a name="M000042"></a><b>links</b>()
|
||||
<a name="M000042"></a><b>delete</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -421,11 +313,110 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L47" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000042_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 47</span>
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 76</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>
|
||||
<span class="ruby-identifier">inode</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-keyword kw">self</span>)
|
||||
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">delete</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="M000039">
|
||||
|
||||
<a name="M000039"></a><b>entry</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000039_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 64</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entry</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="M000040">
|
||||
|
||||
<a name="M000040"></a><b>inspect</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000040_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 68</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
||||
<span class="ruby-node">"(FakeFile name:#{name.inspect} parent:#{parent.to_s.inspect} size:#{content.size})"</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000037">
|
||||
|
||||
<a name="M000037"></a><b>link</b>(other_file)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000037_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 53</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link</span>(<span class="ruby-identifier">other_file</span>)
|
||||
<span class="ruby-ivar">@inode</span>.<span class="ruby-identifier">link</span>(<span class="ruby-identifier">other_file</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000036">
|
||||
|
||||
<a name="M000036"></a><b>links</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000036_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 49</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">links</span>
|
||||
<span class="ruby-ivar">@inode</span>.<span class="ruby-identifier">links</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -435,9 +426,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000047">
|
||||
<div class="title" id="M000041">
|
||||
|
||||
<a name="M000047"></a><b>to_s</b>()
|
||||
<a name="M000041"></a><b>to_s</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -446,13 +437,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L70" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000047_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 70</span>
|
||||
<div id="M000041_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 72</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">name</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
|
@ -49,7 +49,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000036">clone</a></li>
|
||||
<li><a href="#M000032">clone</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -58,7 +58,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000034">link</a></li>
|
||||
<li><a href="#M000030">link</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -76,7 +76,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000035">unlink</a></li>
|
||||
<li><a href="#M000031">unlink</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -132,11 +132,9 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L6" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000029_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 6</span>
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 7</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">file_owner</span>)
|
||||
<span class="ruby-ivar">@content</span> = <span class="ruby-value str">""</span>
|
||||
<span class="ruby-ivar">@links</span> = [<span class="ruby-identifier">file_owner</span>]
|
||||
@ -149,9 +147,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000036">
|
||||
<div class="title" id="M000032">
|
||||
|
||||
<a name="M000036"></a><b>clone</b>()
|
||||
<a name="M000032"></a><b>clone</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -160,13 +158,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L23" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000036_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 23</span>
|
||||
<div id="M000032_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 24</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>
|
||||
<span class="ruby-identifier">clone</span> = <span class="ruby-keyword kw">super</span>
|
||||
<span class="ruby-identifier">clone</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">content</span>.<span class="ruby-identifier">dup</span>
|
||||
@ -178,9 +174,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000034">
|
||||
<div class="title" id="M000030">
|
||||
|
||||
<a name="M000034"></a><b>link</b>(file)
|
||||
<a name="M000030"></a><b>link</b>(file)
|
||||
|
||||
</div>
|
||||
|
||||
@ -189,13 +185,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L14" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000034_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 14</span>
|
||||
<div id="M000030_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 15</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link</span>(<span class="ruby-identifier">file</span>)
|
||||
<span class="ruby-identifier">links</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">file</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">links</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">file</span>)
|
||||
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">inode</span> = <span class="ruby-keyword kw">self</span>
|
||||
@ -206,9 +200,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000035">
|
||||
<div class="title" id="M000031">
|
||||
|
||||
<a name="M000035"></a><b>unlink</b>(file)
|
||||
<a name="M000031"></a><b>unlink</b>(file)
|
||||
|
||||
</div>
|
||||
|
||||
@ -217,13 +211,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1d410d49554e15391abbd443839c4c380ea8a3e8/lib/fakefs/fake/file.rb#L19" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000035_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 19</span>
|
||||
<div id="M000031_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/file.rb, line 20</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">file</span>)
|
||||
<span class="ruby-identifier">links</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">file</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
|
@ -49,7 +49,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000033">delete</a></li>
|
||||
<li><a href="#M000046">delete</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -58,7 +58,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000032">entry</a></li>
|
||||
<li><a href="#M000045">entry</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -67,7 +67,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000031">inspect</a></li>
|
||||
<li><a href="#M000044">inspect</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -76,7 +76,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000030">new</a></li>
|
||||
<li><a href="#M000043">new</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -85,7 +85,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000038">respond_to?</a></li>
|
||||
<li><a href="#M000047">respond_to?</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -128,9 +128,9 @@
|
||||
<div class="sectiontitle">Class Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000030">
|
||||
<div class="title" id="M000043">
|
||||
|
||||
<a name="M000030"></a><b>new</b>(target)
|
||||
<a name="M000043"></a><b>new</b>(target)
|
||||
|
||||
</div>
|
||||
|
||||
@ -139,12 +139,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/symlink.rb#L6" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000030_source" class="dyn-source">
|
||||
<div id="M000043_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/symlink.rb, line 6</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">target</span>)
|
||||
<span class="ruby-ivar">@target</span> = <span class="ruby-identifier">target</span>
|
||||
@ -157,9 +155,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000033">
|
||||
<div class="title" id="M000046">
|
||||
|
||||
<a name="M000033"></a><b>delete</b>()
|
||||
<a name="M000046"></a><b>delete</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -168,12 +166,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/symlink.rb#L18" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000033_source" class="dyn-source">
|
||||
<div id="M000046_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/symlink.rb, line 18</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>
|
||||
<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-keyword kw">self</span>)
|
||||
@ -184,9 +180,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000032">
|
||||
<div class="title" id="M000045">
|
||||
|
||||
<a name="M000032"></a><b>entry</b>()
|
||||
<a name="M000045"></a><b>entry</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -195,12 +191,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/symlink.rb#L14" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000032_source" class="dyn-source">
|
||||
<div id="M000045_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/symlink.rb, line 14</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entry</span>
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">target</span>)
|
||||
@ -211,9 +205,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000031">
|
||||
<div class="title" id="M000044">
|
||||
|
||||
<a name="M000031"></a><b>inspect</b>()
|
||||
<a name="M000044"></a><b>inspect</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -222,12 +216,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/symlink.rb#L10" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000031_source" class="dyn-source">
|
||||
<div id="M000044_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/symlink.rb, line 10</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
||||
<span class="ruby-node">"symlink(#{target.split('/').last})"</span>
|
||||
@ -238,9 +230,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000038">
|
||||
<div class="title" id="M000047">
|
||||
|
||||
<a name="M000038"></a><b>respond_to?</b>(method)
|
||||
<a name="M000047"></a><b>respond_to?</b>(method)
|
||||
|
||||
</div>
|
||||
|
||||
@ -249,12 +241,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/c00d4506623d16a928fb37ae66084d2c632970a1/lib/fakefs/fake/symlink.rb#L22" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000038_source" class="dyn-source">
|
||||
<div id="M000047_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fake/symlink.rb, line 22</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method</span>)
|
||||
<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method</span>)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -49,7 +49,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000086">directory?</a></li>
|
||||
<li><a href="#M000087">directory?</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -58,9 +58,9 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000083">new</a>,</li>
|
||||
<li><a href="#M000085">new</a>,</li>
|
||||
|
||||
<li><a href="#M000087">nlink</a></li>
|
||||
<li><a href="#M000088">nlink</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -69,7 +69,9 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000085">symlink?</a></li>
|
||||
<li><a href="#M000089">size</a>,</li>
|
||||
|
||||
<li><a href="#M000086">symlink?</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -86,101 +88,35 @@
|
||||
|
||||
|
||||
|
||||
<div class="sectiontitle">Attributes</div>
|
||||
<table border='0' cellpadding='5'>
|
||||
|
||||
<tr valign='top'>
|
||||
<td class='attr-rw'>
|
||||
[R]
|
||||
</td>
|
||||
<td class='attr-name'>ctime</td>
|
||||
<td class='attr-desc'></td>
|
||||
</tr>
|
||||
|
||||
<tr valign='top'>
|
||||
<td class='attr-rw'>
|
||||
[R]
|
||||
</td>
|
||||
<td class='attr-name'>mtime</td>
|
||||
<td class='attr-desc'></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div class="sectiontitle">Class Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000083">
|
||||
|
||||
<a name="M000083"></a><b>new</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/bfffa910e9a8d5caf1628d7707ef19b7c4e5e1f0/lib/fakefs/file.rb#L184" 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 184</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">file</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">file</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">"No such file or directory - #{file}"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">file</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="M000086">
|
||||
|
||||
<a name="M000086"></a><b>directory?</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/bfffa910e9a8d5caf1628d7707ef19b7c4e5e1f0/lib/fakefs/file.rb#L196" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000086_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 196</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directory?</span>
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-ivar">@file</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000087">
|
||||
|
||||
<a name="M000087"></a><b>nlink</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/bfffa910e9a8d5caf1628d7707ef19b7c4e5e1f0/lib/fakefs/file.rb#L200" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000087_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 200</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nlink</span>
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-ivar">@file</span>).<span class="ruby-identifier">links</span>.<span class="ruby-identifier">size</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000085">
|
||||
|
||||
<a name="M000085"></a><b>symlink?</b>()
|
||||
<a name="M000085"></a><b>new</b>(file, __lstat = false)
|
||||
|
||||
</div>
|
||||
|
||||
@ -191,11 +127,123 @@
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/bfffa910e9a8d5caf1628d7707ef19b7c4e5e1f0/lib/fakefs/file.rb#L192" target="_blank" class="github_url">on GitHub</a>
|
||||
|
||||
</p>
|
||||
<div id="M000085_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 192</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">__lstat</span> = <span class="ruby-keyword kw">false</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">file</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">"No such file or directory - #{file}"</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
|
||||
<span class="ruby-ivar">@file</span> = <span class="ruby-identifier">file</span>
|
||||
<span class="ruby-ivar">@fake_file</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-ivar">@file</span>)
|
||||
<span class="ruby-ivar">@__lstat</span> = <span class="ruby-identifier">__lstat</span>
|
||||
<span class="ruby-ivar">@ctime</span> = <span class="ruby-ivar">@fake_file</span>.<span class="ruby-identifier">ctime</span>
|
||||
<span class="ruby-ivar">@mtime</span> = <span class="ruby-ivar">@fake_file</span>.<span class="ruby-identifier">mtime</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="M000087">
|
||||
|
||||
<a name="M000087"></a><b>directory?</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000087_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 208</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directory?</span>
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-ivar">@file</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000088">
|
||||
|
||||
<a name="M000088"></a><b>nlink</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000088_source')" id="l_M000088_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000088_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 212</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nlink</span>
|
||||
<span class="ruby-ivar">@fake_file</span>.<span class="ruby-identifier">links</span>.<span class="ruby-identifier">size</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000089">
|
||||
|
||||
<a name="M000089"></a><b>size</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000089_source')" id="l_M000089_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000089_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 216</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span>
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@__lstat</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">symlink?</span>
|
||||
<span class="ruby-ivar">@fake_file</span>.<span class="ruby-identifier">target</span>.<span class="ruby-identifier">size</span>
|
||||
<span class="ruby-keyword kw">else</span>
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-ivar">@file</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="M000086">
|
||||
|
||||
<a name="M000086"></a><b>symlink?</b>()
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000086_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file.rb, line 204</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symlink?</span>
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-ivar">@file</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000062">add</a></li>
|
||||
<li><a href="#M000061">add</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -52,13 +52,13 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000073">chdir</a>,</li>
|
||||
<li><a href="#M000067">chdir</a>,</li>
|
||||
|
||||
<li><a href="#M000055">clear</a>,</li>
|
||||
<li><a href="#M000054">clear</a>,</li>
|
||||
|
||||
<li><a href="#M000065">clone</a>,</li>
|
||||
<li><a href="#M000062">clone</a>,</li>
|
||||
|
||||
<li><a href="#M000079">current_dir</a></li>
|
||||
<li><a href="#M000078">current_dir</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -67,9 +67,9 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000070">delete</a>,</li>
|
||||
<li><a href="#M000066">delete</a>,</li>
|
||||
|
||||
<li><a href="#M000053">dir_levels</a></li>
|
||||
<li><a href="#M000052">dir_levels</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -78,11 +78,11 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000056">files</a>,</li>
|
||||
<li><a href="#M000055">files</a>,</li>
|
||||
|
||||
<li><a href="#M000057">find</a>,</li>
|
||||
<li><a href="#M000056">find</a>,</li>
|
||||
|
||||
<li><a href="#M000054">fs</a></li>
|
||||
<li><a href="#M000053">fs</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -91,7 +91,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000077">normalize_path</a></li>
|
||||
<li><a href="#M000074">normalize_path</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -100,7 +100,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000076">path_parts</a></li>
|
||||
<li><a href="#M000073">path_parts</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -122,9 +122,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000062">
|
||||
<div class="title" id="M000061">
|
||||
|
||||
<a name="M000062"></a><b>add</b>(path, object=FakeDir.new)
|
||||
<a name="M000061"></a><b>add</b>(path, object=FakeDir.new)
|
||||
|
||||
</div>
|
||||
|
||||
@ -133,12 +133,10 @@
|
||||
|
||||
<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/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L35" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000061_source')" id="l_M000061_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000062_source" class="dyn-source">
|
||||
<div id="M000061_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 35</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">object</span>=<span class="ruby-constant">FakeDir</span>.<span class="ruby-identifier">new</span>)
|
||||
<span class="ruby-identifier">parts</span> = <span class="ruby-identifier">path_parts</span>(<span class="ruby-identifier">normalize_path</span>(<span class="ruby-identifier">path</span>))
|
||||
@ -157,9 +155,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000073">
|
||||
<div class="title" id="M000067">
|
||||
|
||||
<a name="M000073"></a><b>chdir</b>(dir, &blk)
|
||||
<a name="M000067"></a><b>chdir</b>(dir, &blk)
|
||||
|
||||
</div>
|
||||
|
||||
@ -168,12 +166,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L74" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000073_source" class="dyn-source">
|
||||
<div id="M000067_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 74</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
||||
<span class="ruby-identifier">new_dir</span> = <span class="ruby-identifier">find</span>(<span class="ruby-identifier">dir</span>)
|
||||
@ -192,9 +188,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000055">
|
||||
<div class="title" id="M000054">
|
||||
|
||||
<a name="M000055"></a><b>clear</b>()
|
||||
<a name="M000054"></a><b>clear</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -203,12 +199,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L13" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000054_source')" id="l_M000054_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000055_source" class="dyn-source">
|
||||
<div id="M000054_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 13</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear</span>
|
||||
<span class="ruby-ivar">@dir_levels</span> = <span class="ruby-keyword kw">nil</span>
|
||||
@ -220,9 +214,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000065">
|
||||
<div class="title" id="M000062">
|
||||
|
||||
<a name="M000065"></a><b>clone</b>(path)
|
||||
<a name="M000062"></a><b>clone</b>(path)
|
||||
|
||||
</div>
|
||||
|
||||
@ -238,12 +232,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<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/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L49" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000065_source" class="dyn-source">
|
||||
<div id="M000062_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 49</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">path</span>)
|
||||
@ -269,9 +261,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000079">
|
||||
<div class="title" id="M000078">
|
||||
|
||||
<a name="M000079"></a><b>current_dir</b>()
|
||||
<a name="M000078"></a><b>current_dir</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -280,12 +272,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000079_source')" id="l_M000079_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L99" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000078_source')" id="l_M000078_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000079_source" class="dyn-source">
|
||||
<div id="M000078_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 99</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_dir</span>
|
||||
<span class="ruby-identifier">find</span>(<span class="ruby-identifier">normalize_path</span>(<span class="ruby-value str">'.'</span>))
|
||||
@ -296,9 +286,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000070">
|
||||
<div class="title" id="M000066">
|
||||
|
||||
<a name="M000070"></a><b>delete</b>(path)
|
||||
<a name="M000066"></a><b>delete</b>(path)
|
||||
|
||||
</div>
|
||||
|
||||
@ -307,12 +297,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<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/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L68" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000070_source" class="dyn-source">
|
||||
<div id="M000066_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 68</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
|
||||
@ -325,9 +313,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000053">
|
||||
<div class="title" id="M000052">
|
||||
|
||||
<a name="M000053"></a><b>dir_levels</b>()
|
||||
<a name="M000052"></a><b>dir_levels</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -336,12 +324,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<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/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L5" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000052_source')" id="l_M000052_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000053_source" class="dyn-source">
|
||||
<div id="M000052_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 5</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dir_levels</span>
|
||||
<span class="ruby-ivar">@dir_levels</span> <span class="ruby-operator">||=</span> []
|
||||
@ -352,9 +338,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000056">
|
||||
<div class="title" id="M000055">
|
||||
|
||||
<a name="M000056"></a><b>files</b>()
|
||||
<a name="M000055"></a><b>files</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -363,12 +349,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L18" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000056_source" class="dyn-source">
|
||||
<div id="M000055_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 18</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files</span>
|
||||
<span class="ruby-identifier">fs</span>.<span class="ruby-identifier">values</span>
|
||||
@ -379,9 +363,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000057">
|
||||
<div class="title" id="M000056">
|
||||
|
||||
<a name="M000057"></a><b>find</b>(path)
|
||||
<a name="M000056"></a><b>find</b>(path)
|
||||
|
||||
</div>
|
||||
|
||||
@ -390,12 +374,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L22" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000057_source" class="dyn-source">
|
||||
<div id="M000056_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 22</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-identifier">parts</span> = <span class="ruby-identifier">path_parts</span>(<span class="ruby-identifier">normalize_path</span>(<span class="ruby-identifier">path</span>))
|
||||
@ -415,9 +397,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000054">
|
||||
<div class="title" id="M000053">
|
||||
|
||||
<a name="M000054"></a><b>fs</b>()
|
||||
<a name="M000053"></a><b>fs</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -426,12 +408,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000054_source')" id="l_M000054_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L9" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000053_source')" id="l_M000053_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000054_source" class="dyn-source">
|
||||
<div id="M000053_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 9</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fs</span>
|
||||
<span class="ruby-ivar">@fs</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">FakeDir</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'.'</span>)
|
||||
@ -442,9 +422,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000077">
|
||||
<div class="title" id="M000074">
|
||||
|
||||
<a name="M000077"></a><b>normalize_path</b>(path)
|
||||
<a name="M000074"></a><b>normalize_path</b>(path)
|
||||
|
||||
</div>
|
||||
|
||||
@ -453,12 +433,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L90" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000074_source')" id="l_M000074_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000077_source" class="dyn-source">
|
||||
<div id="M000074_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 90</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">normalize_path</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">absolute?</span>
|
||||
@ -474,9 +452,9 @@ copies directories and files from the real filesystem into our fake one
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000076">
|
||||
<div class="title" id="M000073">
|
||||
|
||||
<a name="M000076"></a><b>path_parts</b>(path)
|
||||
<a name="M000073"></a><b>path_parts</b>(path)
|
||||
|
||||
</div>
|
||||
|
||||
@ -485,12 +463,10 @@ copies directories and files from the real filesystem into our fake one
|
||||
|
||||
<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/1c6825fb9b4d5c8c73fee01a8fbd328cea2b78fa/lib/fakefs/file_system.rb#L86" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000076_source" class="dyn-source">
|
||||
<div id="M000073_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_system.rb, line 86</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_parts</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>).<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span> <span class="ruby-identifier">part</span>.<span class="ruby-identifier">empty?</span> }
|
||||
|
101
classes/FakeFS/FileTest.html
Normal file
101
classes/FakeFS/FileTest.html
Normal file
@ -0,0 +1,101 @@
|
||||
<?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::FileTest</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::FileTest
|
||||
|
||||
<span class="parent"><
|
||||
|
||||
<a href="../Object.html">Object</a>
|
||||
|
||||
</span>
|
||||
|
||||
</h1>
|
||||
<ul class="files">
|
||||
|
||||
<li><a href="../../files/lib/fakefs/file_test_rb.html">lib/fakefs/file_test.rb</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div id="bodyContent">
|
||||
<div id="content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sectiontitle">Methods</div>
|
||||
<dl class="methods">
|
||||
|
||||
<dt>E</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000118">exist?</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sectiontitle">Class Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000118">
|
||||
|
||||
<a name="M000118"></a><b>exist?</b>(file_name)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000118_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/file_test.rb, line 3</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">file_name</span>)
|
||||
<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">file_name</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -43,17 +43,17 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000122">cd</a>,</li>
|
||||
<li><a href="#M000137">cd</a>,</li>
|
||||
|
||||
<li><a href="#M000123">chdir</a>,</li>
|
||||
<li><a href="#M000138">chdir</a>,</li>
|
||||
|
||||
<li><a href="#M000117">chown</a>,</li>
|
||||
<li><a href="#M000134">chown</a>,</li>
|
||||
|
||||
<li><a href="#M000118">chown_R</a>,</li>
|
||||
<li><a href="#M000135">chown_R</a>,</li>
|
||||
|
||||
<li><a href="#M000114">cp</a>,</li>
|
||||
<li><a href="#M000128">cp</a>,</li>
|
||||
|
||||
<li><a href="#M000115">cp_r</a></li>
|
||||
<li><a href="#M000129">cp_r</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -62,9 +62,9 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000112">ln_s</a>,</li>
|
||||
<li><a href="#M000126">ln_s</a>,</li>
|
||||
|
||||
<li><a href="#M000113">ln_sf</a></li>
|
||||
<li><a href="#M000127">ln_sf</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -73,11 +73,11 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000105">mkdir_p</a>,</li>
|
||||
<li><a href="#M000119">mkdir_p</a>,</li>
|
||||
|
||||
<li><a href="#M000106">mkpath</a>,</li>
|
||||
<li><a href="#M000120">mkpath</a>,</li>
|
||||
|
||||
<li><a href="#M000116">mv</a></li>
|
||||
<li><a href="#M000130">mv</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -86,15 +86,15 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000108">rm</a>,</li>
|
||||
<li><a href="#M000122">rm</a>,</li>
|
||||
|
||||
<li><a href="#M000111">rm_f</a>,</li>
|
||||
<li><a href="#M000125">rm_f</a>,</li>
|
||||
|
||||
<li><a href="#M000110">rm_r</a>,</li>
|
||||
<li><a href="#M000124">rm_r</a>,</li>
|
||||
|
||||
<li><a href="#M000109">rm_rf</a>,</li>
|
||||
<li><a href="#M000123">rm_rf</a>,</li>
|
||||
|
||||
<li><a href="#M000107">rmdir</a></li>
|
||||
<li><a href="#M000121">rmdir</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -103,7 +103,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000119">touch</a></li>
|
||||
<li><a href="#M000136">touch</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -125,9 +125,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000122">
|
||||
<div class="title" id="M000137">
|
||||
|
||||
<a name="M000122"></a><b>cd</b>(dir)
|
||||
<a name="M000137"></a><b>cd</b>(dir)
|
||||
|
||||
</div>
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
<div class="aka">
|
||||
This method is also aliased as
|
||||
|
||||
<a href="FileUtils.html#M000123">chdir</a>
|
||||
<a href="FileUtils.html#M000138">chdir</a>
|
||||
|
||||
</div>
|
||||
|
||||
@ -143,12 +143,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L124" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000137_source')" id="l_M000137_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000122_source" class="dyn-source">
|
||||
<div id="M000137_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 124</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cd</span>(<span class="ruby-identifier">dir</span>)
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">dir</span>)
|
||||
@ -159,15 +157,15 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000123">
|
||||
<div class="title" id="M000138">
|
||||
|
||||
<a name="M000123"></a><b>chdir</b>(dir)
|
||||
<a name="M000138"></a><b>chdir</b>(dir)
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>
|
||||
Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
Alias for <a href="FileUtils.html#M000137">cd</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -177,9 +175,9 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000117">
|
||||
<div class="title" id="M000134">
|
||||
|
||||
<a name="M000117"></a><b>chown</b>(user, group, list, options={})
|
||||
<a name="M000134"></a><b>chown</b>(user, group, list, options={})
|
||||
|
||||
</div>
|
||||
|
||||
@ -188,12 +186,10 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000117_source')" id="l_M000117_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L98" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000134_source')" id="l_M000134_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000117_source" class="dyn-source">
|
||||
<div id="M000134_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 98</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chown</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>, <span class="ruby-identifier">list</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-identifier">list</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">list</span>)
|
||||
@ -210,9 +206,9 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000118">
|
||||
<div class="title" id="M000135">
|
||||
|
||||
<a name="M000118"></a><b>chown_R</b>(user, group, list, options={})
|
||||
<a name="M000135"></a><b>chown_R</b>(user, group, list, options={})
|
||||
|
||||
</div>
|
||||
|
||||
@ -221,12 +217,10 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L108" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000135_source')" id="l_M000135_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000118_source" class="dyn-source">
|
||||
<div id="M000135_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 108</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chown_R</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>, <span class="ruby-identifier">list</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-identifier">chown</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>, <span class="ruby-identifier">list</span>, <span class="ruby-identifier">options</span>={})
|
||||
@ -237,9 +231,9 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000114">
|
||||
<div class="title" id="M000128">
|
||||
|
||||
<a name="M000114"></a><b>cp</b>(src, dest)
|
||||
<a name="M000128"></a><b>cp</b>(src, dest)
|
||||
|
||||
</div>
|
||||
|
||||
@ -248,12 +242,10 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L41" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000128_source')" id="l_M000128_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000114_source" class="dyn-source">
|
||||
<div id="M000128_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 41</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>)
|
||||
<span class="ruby-identifier">dst_file</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">dest</span>)
|
||||
@ -280,9 +272,9 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000115">
|
||||
<div class="title" id="M000129">
|
||||
|
||||
<a name="M000115"></a><b>cp_r</b>(src, dest)
|
||||
<a name="M000129"></a><b>cp_r</b>(src, dest)
|
||||
|
||||
</div>
|
||||
|
||||
@ -291,12 +283,10 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L61" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000129_source')" id="l_M000129_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000115_source" class="dyn-source">
|
||||
<div id="M000129_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 61</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp_r</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>)
|
||||
<span class="ruby-comment cmt"># This error sucks, but it conforms to the original Ruby</span>
|
||||
@ -331,9 +321,9 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000112">
|
||||
<div class="title" id="M000126">
|
||||
|
||||
<a name="M000112"></a><b>ln_s</b>(target, path, options = {})
|
||||
<a name="M000126"></a><b>ln_s</b>(target, path, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
@ -342,13 +332,11 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000112_source')" id="l_M000112_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L30" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000126_source')" id="l_M000126_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000112_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 30</span>
|
||||
<div id="M000126_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 32</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ln_s</span>(<span class="ruby-identifier">target</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">options</span> = {})
|
||||
<span class="ruby-identifier">options</span> = { <span class="ruby-identifier">:force</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span> }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
|
||||
(<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-identifier">:force</span>]) <span class="ruby-operator">?</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-identifier">path</span>) <span class="ruby-operator">:</span> <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
|
||||
@ -360,9 +348,9 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000113">
|
||||
<div class="title" id="M000127">
|
||||
|
||||
<a name="M000113"></a><b>ln_sf</b>(target, path)
|
||||
<a name="M000127"></a><b>ln_sf</b>(target, path)
|
||||
|
||||
</div>
|
||||
|
||||
@ -371,13 +359,11 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L35" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000127_source')" id="l_M000127_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000113_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 35</span>
|
||||
<div id="M000127_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 37</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ln_sf</span>(<span class="ruby-identifier">target</span>, <span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-identifier">ln_s</span>(<span class="ruby-identifier">target</span>, <span class="ruby-identifier">path</span>, { <span class="ruby-identifier">:force</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span> })
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
@ -387,9 +373,9 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000105">
|
||||
<div class="title" id="M000119">
|
||||
|
||||
<a name="M000105"></a><b>mkdir_p</b>(path)
|
||||
<a name="M000119"></a><b>mkdir_p</b>(path, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
@ -397,7 +383,7 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
<div class="aka">
|
||||
This method is also aliased as
|
||||
|
||||
<a href="FileUtils.html#M000106">mkpath</a>
|
||||
<a href="FileUtils.html#M000120">mkpath</a>
|
||||
|
||||
</div>
|
||||
|
||||
@ -405,14 +391,12 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
|
||||
<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/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L5" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000105_source" class="dyn-source">
|
||||
<div id="M000119_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 5</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">options</span> = {})
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span>, <span class="ruby-constant">FakeDir</span>.<span class="ruby-identifier">new</span>)
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
@ -421,15 +405,15 @@ Alias for <a href="FileUtils.html#M000122">cd</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000106">
|
||||
<div class="title" id="M000120">
|
||||
|
||||
<a name="M000106"></a><b>mkpath</b>(path)
|
||||
<a name="M000120"></a><b>mkpath</b>(path, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>
|
||||
Alias for <a href="FileUtils.html#M000105">mkdir_p</a>
|
||||
Alias for <a href="FileUtils.html#M000119">mkdir_p</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -439,9 +423,9 @@ Alias for <a href="FileUtils.html#M000105">mkdir_p</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000116">
|
||||
<div class="title" id="M000130">
|
||||
|
||||
<a name="M000116"></a><b>mv</b>(src, dest)
|
||||
<a name="M000130"></a><b>mv</b>(src, dest, options={})
|
||||
|
||||
</div>
|
||||
|
||||
@ -450,14 +434,12 @@ Alias for <a href="FileUtils.html#M000105">mkdir_p</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L89" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000130_source')" id="l_M000130_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000116_source" class="dyn-source">
|
||||
<div id="M000130_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 89</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mv</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>)
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mv</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">target</span> = <span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">src</span>)
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">dest</span>, <span class="ruby-identifier">target</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">clone</span>)
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">src</span>)
|
||||
@ -471,9 +453,9 @@ Alias for <a href="FileUtils.html#M000105">mkdir_p</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000108">
|
||||
<div class="title" id="M000122">
|
||||
|
||||
<a name="M000108"></a><b>rm</b>(path)
|
||||
<a name="M000122"></a><b>rm</b>(list, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
@ -481,11 +463,11 @@ Alias for <a href="FileUtils.html#M000105">mkdir_p</a>
|
||||
<div class="aka">
|
||||
This method is also aliased as
|
||||
|
||||
<a href="FileUtils.html#M000109">rm_rf</a>
|
||||
<a href="FileUtils.html#M000123">rm_rf</a>
|
||||
|
||||
<a href="FileUtils.html#M000110">rm_r</a>
|
||||
<a href="FileUtils.html#M000124">rm_r</a>
|
||||
|
||||
<a href="FileUtils.html#M000111">rm_f</a>
|
||||
<a href="FileUtils.html#M000125">rm_f</a>
|
||||
|
||||
</div>
|
||||
|
||||
@ -493,15 +475,15 @@ Alias for <a href="FileUtils.html#M000105">mkdir_p</a>
|
||||
|
||||
<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/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L22" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000108_source" class="dyn-source">
|
||||
<div id="M000122_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 22</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm</span>(<span class="ruby-identifier">list</span>, <span class="ruby-identifier">options</span> = {})
|
||||
<span class="ruby-constant">Array</span>(<span class="ruby-identifier">list</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
||||
<span class="ruby-constant">FileSystem</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
|
||||
<span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
@ -509,15 +491,15 @@ Alias for <a href="FileUtils.html#M000105">mkdir_p</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000111">
|
||||
<div class="title" id="M000125">
|
||||
|
||||
<a name="M000111"></a><b>rm_f</b>(path)
|
||||
<a name="M000125"></a><b>rm_f</b>(list, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>
|
||||
Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
Alias for <a href="FileUtils.html#M000122">rm</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -527,15 +509,15 @@ Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000110">
|
||||
<div class="title" id="M000124">
|
||||
|
||||
<a name="M000110"></a><b>rm_r</b>(path)
|
||||
<a name="M000124"></a><b>rm_r</b>(list, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>
|
||||
Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
Alias for <a href="FileUtils.html#M000122">rm</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -545,15 +527,15 @@ Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000109">
|
||||
<div class="title" id="M000123">
|
||||
|
||||
<a name="M000109"></a><b>rm_rf</b>(path)
|
||||
<a name="M000123"></a><b>rm_rf</b>(list, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>
|
||||
Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
Alias for <a href="FileUtils.html#M000122">rm</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -563,9 +545,9 @@ Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000107">
|
||||
<div class="title" id="M000121">
|
||||
|
||||
<a name="M000107"></a><b>rmdir</b>(list, options = {})
|
||||
<a name="M000121"></a><b>rmdir</b>(list, options = {})
|
||||
|
||||
</div>
|
||||
|
||||
@ -574,12 +556,10 @@ Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
|
||||
<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/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L10" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000107_source" class="dyn-source">
|
||||
<div id="M000121_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 10</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rmdir</span>(<span class="ruby-identifier">list</span>, <span class="ruby-identifier">options</span> = {})
|
||||
<span class="ruby-identifier">list</span> = [ <span class="ruby-identifier">list</span> ] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
||||
@ -598,9 +578,9 @@ Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000119">
|
||||
<div class="title" id="M000136">
|
||||
|
||||
<a name="M000119"></a><b>touch</b>(list, options={})
|
||||
<a name="M000136"></a><b>touch</b>(list, options={})
|
||||
|
||||
</div>
|
||||
|
||||
@ -609,12 +589,10 @@ Alias for <a href="FileUtils.html#M000108">rm</a>
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/e5d7b716ed2e8419cd3c58fabdd8f8c3f1810794/lib/fakefs/fileutils.rb#L112" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000136_source')" id="l_M000136_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000119_source" class="dyn-source">
|
||||
<div id="M000136_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/fileutils.rb, line 112</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">touch</span>(<span class="ruby-identifier">list</span>, <span class="ruby-identifier">options</span>={})
|
||||
<span class="ruby-constant">Array</span>(<span class="ruby-identifier">list</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000120">extended</a></li>
|
||||
<li><a href="#M000131">extended</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -52,7 +52,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000121">included</a></li>
|
||||
<li><a href="#M000132">included</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -61,7 +61,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000124">use_fakefs</a></li>
|
||||
<li><a href="#M000133">use_fakefs</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -83,9 +83,9 @@
|
||||
<div class="sectiontitle">Class Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000120">
|
||||
<div class="title" id="M000131">
|
||||
|
||||
<a name="M000120"></a><b>extended</b>(example_group)
|
||||
<a name="M000131"></a><b>extended</b>(example_group)
|
||||
|
||||
</div>
|
||||
|
||||
@ -94,12 +94,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/85d4fa117317385f8e2aa5c441b23ff5f84239c3/lib/fakefs/spec_helpers.rb#L27" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000131_source')" id="l_M000131_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000120_source" class="dyn-source">
|
||||
<div id="M000131_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/spec_helpers.rb, line 27</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">extended</span>(<span class="ruby-identifier">example_group</span>)
|
||||
<span class="ruby-identifier">example_group</span>.<span class="ruby-identifier">use_fakefs</span>(<span class="ruby-identifier">example_group</span>)
|
||||
@ -110,9 +108,9 @@
|
||||
</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000121">
|
||||
<div class="title" id="M000132">
|
||||
|
||||
<a name="M000121"></a><b>included</b>(example_group)
|
||||
<a name="M000132"></a><b>included</b>(example_group)
|
||||
|
||||
</div>
|
||||
|
||||
@ -121,12 +119,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/85d4fa117317385f8e2aa5c441b23ff5f84239c3/lib/fakefs/spec_helpers.rb#L31" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000132_source')" id="l_M000132_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000121_source" class="dyn-source">
|
||||
<div id="M000132_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/spec_helpers.rb, line 31</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">example_group</span>)
|
||||
<span class="ruby-identifier">example_group</span>.<span class="ruby-identifier">extend</span> <span class="ruby-keyword kw">self</span>
|
||||
@ -139,9 +135,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000124">
|
||||
<div class="title" id="M000133">
|
||||
|
||||
<a name="M000124"></a><b>use_fakefs</b>(describe_block)
|
||||
<a name="M000133"></a><b>use_fakefs</b>(describe_block)
|
||||
|
||||
</div>
|
||||
|
||||
@ -150,12 +146,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/85d4fa117317385f8e2aa5c441b23ff5f84239c3/lib/fakefs/spec_helpers.rb#L35" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000133_source')" id="l_M000133_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000124_source" class="dyn-source">
|
||||
<div id="M000133_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/spec_helpers.rb, line 35</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">use_fakefs</span>(<span class="ruby-identifier">describe_block</span>)
|
||||
<span class="ruby-identifier">describe_block</span>.<span class="ruby-identifier">before</span> <span class="ruby-identifier">:each</span> <span class="ruby-keyword kw">do</span>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000125">to_s</a></li>
|
||||
<li><a href="#M000139">to_s</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -64,7 +64,7 @@
|
||||
<tr valign='top'>
|
||||
<td class="attr-name">VERSION</td>
|
||||
<td>=</td>
|
||||
<td class="attr-value">"0.2.1"</td>
|
||||
<td class="attr-value">"0.3.0"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -77,9 +77,9 @@
|
||||
<div class="sectiontitle">Class Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000125">
|
||||
<div class="title" id="M000139">
|
||||
|
||||
<a name="M000125"></a><b>to_s</b>()
|
||||
<a name="M000139"></a><b>to_s</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -88,12 +88,10 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/7ede661879a701eeab012ef2755493622565e8c1/lib/fakefs/version.rb#L5" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000139_source')" id="l_M000139_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000125_source" class="dyn-source">
|
||||
<div id="M000139_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/version.rb, line 5</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-constant">VERSION</span>
|
||||
|
@ -47,7 +47,7 @@
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
<li><a href="#M000002">FakeFS</a></li>
|
||||
<li><a href="#M000004">FakeFS</a></li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
@ -69,9 +69,9 @@
|
||||
<div class="sectiontitle">Instance Public methods</div>
|
||||
|
||||
<div class="method">
|
||||
<div class="title" id="M000002">
|
||||
<div class="title" id="M000004">
|
||||
|
||||
<a name="M000002"></a><b>FakeFS</b>()
|
||||
<a name="M000004"></a><b>FakeFS</b>()
|
||||
|
||||
</div>
|
||||
|
||||
@ -80,13 +80,11 @@
|
||||
|
||||
<div class="sourcecode">
|
||||
<p class="source-link">
|
||||
Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
|
||||
|
||||
| <a href="http://github.com/defunkt/fakefs/blob/7444ef50b3ffbb8a534182b2a3af6a0b6073b32f/lib/fakefs/base.rb#L31" target="_blank" class="github_url">on GitHub</a>
|
||||
Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
|
||||
|
||||
</p>
|
||||
<div id="M000002_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/base.rb, line 31</span>
|
||||
<div id="M000004_source" class="dyn-source">
|
||||
<pre><span class="ruby-comment cmt"># File lib/fakefs/base.rb, line 38</span>
|
||||
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">FakeFS</span>
|
||||
<span class="ruby-keyword kw">return</span> <span class="ruby-operator">::</span><span class="ruby-constant">FakeFS</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
|
||||
<span class="ruby-operator">::</span><span class="ruby-constant">FakeFS</span>.<span class="ruby-identifier">activate!</span>
|
||||
|
@ -1 +1 @@
|
||||
Fri, 30 Oct 2009 10:03:17 -0700
|
||||
Sat, 18 Dec 2010 14:13:59 -0500
|
||||
|
15
css/main.css
15
css/main.css
@ -47,6 +47,21 @@ h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
td, th
|
||||
{
|
||||
padding: 0 0.7em 0.3em 0;
|
||||
}
|
||||
|
||||
th
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.clear
|
||||
{
|
||||
clear: both;
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>CONTRIBUTORS</li>
|
||||
<li>Last modified: Wed Oct 07 01:37:58 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -31,10 +31,10 @@
|
||||
<li>Chris Wanstrath
|
||||
|
||||
</li>
|
||||
<li>Jeff Hodges
|
||||
<li>Scott Taylor
|
||||
|
||||
</li>
|
||||
<li>Scott Taylor
|
||||
<li>Jeff Hodges
|
||||
|
||||
</li>
|
||||
<li>Pat Nakajima
|
||||
@ -52,17 +52,44 @@
|
||||
<li>Tymon Tobolski
|
||||
|
||||
</li>
|
||||
<li>msassak
|
||||
|
||||
</li>
|
||||
<li>Rob Sanheim
|
||||
<li>Ben Mabey
|
||||
|
||||
</li>
|
||||
<li>Jon Yurek
|
||||
|
||||
</li>
|
||||
<li>Scott Barron
|
||||
|
||||
</li>
|
||||
<li>dmathieu
|
||||
|
||||
</li>
|
||||
<li>Rob Sanheim
|
||||
|
||||
</li>
|
||||
<li>David Reese
|
||||
|
||||
</li>
|
||||
<li>msassak
|
||||
|
||||
</li>
|
||||
<li>Sam Goldstein
|
||||
|
||||
</li>
|
||||
<li>jameswilding
|
||||
|
||||
</li>
|
||||
<li>Greg Campbell
|
||||
|
||||
</li>
|
||||
<li>Thiago Marano
|
||||
|
||||
</li>
|
||||
<li>Víctor Martínez
|
||||
|
||||
</li>
|
||||
<li>Victor Costan
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>LICENSE</li>
|
||||
<li>Last modified: Tue Oct 06 21:44:09 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>README.markdown</li>
|
||||
<li>Last modified: Wed Oct 28 11:02:19 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -27,104 +27,184 @@
|
||||
<div id="content">
|
||||
|
||||
<div class="description">
|
||||
<h1>FakeFS</h1>
|
||||
<p>
|
||||
<a href="../classes/FakeFS.html">FakeFS</a>
|
||||
</p>
|
||||
<h6></h6>
|
||||
<p>
|
||||
Mocha is great. But when your library is all about manipulating the
|
||||
filesystem, you really want to test the behavior and not the
|
||||
implementation.
|
||||
</p>
|
||||
<p>
|
||||
If you’re mocking and stubbing every call to FileUtils or File,
|
||||
you’re tightly coupling your tests with the implementation.
|
||||
</p>
|
||||
<pre>
|
||||
def test_creates_directory
|
||||
FileUtils.expects(:mkdir).with("directory").once
|
||||
Library.add "directory"
|
||||
end
|
||||
</pre>
|
||||
<p>
|
||||
The above test will break if we decide to use `mkdir_p` in our code.
|
||||
Refactoring code shouldn’t necessitate refactoring tests.
|
||||
</p>
|
||||
<p>
|
||||
With FakeFS:
|
||||
</p>
|
||||
<pre>
|
||||
def test_creates_directory
|
||||
Library.add "directory"
|
||||
assert File.directory?("directory")
|
||||
end
|
||||
</pre>
|
||||
<p>
|
||||
Woot.
|
||||
</p>
|
||||
<p>
|
||||
Usage
|
||||
</p>
|
||||
<hr size="3"></hr><pre>
|
||||
require 'fakefs'
|
||||
|
||||
<p>Mocha is great. But when your library is all about manipulating the
|
||||
filesystem, you really want to test the behavior and not the implementation.</p>
|
||||
# That's it.
|
||||
</pre>
|
||||
<p>
|
||||
Don’t Fake the FS Immediately
|
||||
</p>
|
||||
<hr size="10"></hr><pre>
|
||||
require 'fakefs/safe'
|
||||
|
||||
<p>If you're mocking and stubbing every call to FileUtils or File, you're
|
||||
tightly coupling your tests with the implementation.</p>
|
||||
FakeFS.activate!
|
||||
# your code
|
||||
FakeFS.deactivate!
|
||||
|
||||
<pre><code>def test_creates_directory
|
||||
FileUtils.expects(:mkdir).with("directory").once
|
||||
Library.add "directory"
|
||||
end
|
||||
</code></pre>
|
||||
# or
|
||||
FakeFS do
|
||||
# your code
|
||||
end
|
||||
</pre>
|
||||
<p>
|
||||
RSpec
|
||||
</p>
|
||||
<hr size="3"></hr><p>
|
||||
The above approach works with RSpec as well. In addition you may include <a
|
||||
href="../classes/FakeFS/SpecHelpers.html">FakeFS::SpecHelpers</a> to turn
|
||||
<a href="../classes/FakeFS.html">FakeFS</a> on and off in a given example
|
||||
group:
|
||||
</p>
|
||||
<pre>
|
||||
require 'fakefs/spec_helpers'
|
||||
|
||||
<p>The above test will break if we decide to use <code>mkdir_p</code> in our code. Refactoring
|
||||
code shouldn't necessitate refactoring tests.</p>
|
||||
describe "my spec" do
|
||||
include FakeFS::SpecHelpers
|
||||
end
|
||||
</pre>
|
||||
<p>
|
||||
See `<a
|
||||
href="lib/fakefs/spec_helpers_rb.html">lib/fakefs/spec_helpers.rb</a>` for
|
||||
more info.
|
||||
</p>
|
||||
<p>
|
||||
How is this different than MockFS?
|
||||
</p>
|
||||
<hr size="10"></hr><p>
|
||||
<a href="../classes/FakeFS.html">FakeFS</a> provides a test suite and works
|
||||
with symlinks. It’s also strictly a test-time dependency: your actual
|
||||
library does not need to use or know about <a
|
||||
href="../classes/FakeFS.html">FakeFS</a>.
|
||||
</p>
|
||||
<p>
|
||||
Caveats
|
||||
</p>
|
||||
<hr size="5"></hr><p>
|
||||
<a href="../classes/FakeFS.html">FakeFS</a> internally uses the `Pathname`
|
||||
and `FileUtils` constants. If you use these in your app, be certain
|
||||
you’re properly requiring them and not counting on FakeFS’ own
|
||||
require.
|
||||
</p>
|
||||
<p>
|
||||
Speed?
|
||||
</p>
|
||||
<hr size="4"></hr><p>
|
||||
<<a href="http://gist.github.com/156091">gist.github.com/156091</a>>
|
||||
</p>
|
||||
<p>
|
||||
Installation
|
||||
</p>
|
||||
<hr size="10"></hr><p>
|
||||
### [Gemcutter](<a href="http://gemcutter.org/">gemcutter.org/</a>)
|
||||
</p>
|
||||
<pre>
|
||||
$ gem install fakefs
|
||||
</pre>
|
||||
<p>
|
||||
### [Rip](<a href="http://hellorip.com">hellorip.com</a>)
|
||||
</p>
|
||||
<pre>
|
||||
$ rip install git://github.com/defunkt/fakefs.git
|
||||
</pre>
|
||||
<p>
|
||||
Contributing
|
||||
</p>
|
||||
<hr size="10"></hr><p>
|
||||
Once you’ve made your great commits:
|
||||
</p>
|
||||
<ol>
|
||||
<li>[Fork][0] <a href="../classes/FakeFS.html">FakeFS</a>
|
||||
|
||||
<p>With FakeFS:</p>
|
||||
</li>
|
||||
<li>Create a topic branch - `git checkout -b my_branch`
|
||||
|
||||
<pre><code>def test_creates_directory
|
||||
Library.add "directory"
|
||||
assert File.directory?("directory")
|
||||
end
|
||||
</code></pre>
|
||||
</li>
|
||||
<li>Push to your branch - `git push origin my_branch`
|
||||
|
||||
<p>Woot.</p>
|
||||
</li>
|
||||
<li>Create an [Issue][1] with a link to your branch
|
||||
|
||||
<h2>Usage</h2>
|
||||
</li>
|
||||
<li>That’s it!
|
||||
|
||||
<pre><code>require 'fakefs'
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
Meta
|
||||
</p>
|
||||
<hr size="2"></hr><ul>
|
||||
<li>Code: `git clone git://github.com/defunkt/fakefs.git`
|
||||
|
||||
# That's it.
|
||||
</code></pre>
|
||||
</li>
|
||||
<li>Home: <<a
|
||||
href="http://github.com/defunkt/fakefs">github.com/defunkt/fakefs</a>>
|
||||
|
||||
<h2>Don't Fake the FS Immediately</h2>
|
||||
</li>
|
||||
<li>Docs: <<a
|
||||
href="http://defunkt.github.com/fakefs">defunkt.github.com/fakefs</a>>
|
||||
|
||||
<pre><code>require 'fakefs/safe'
|
||||
</li>
|
||||
<li>Bugs: <<a
|
||||
href="http://github.com/defunkt/fakefs/issues">github.com/defunkt/fakefs/issues</a>>
|
||||
|
||||
FakeFS.activate!
|
||||
# your code
|
||||
FakeFS.deactivate!
|
||||
</li>
|
||||
<li>List: <<a
|
||||
href="http://groups.google.com/group/fakefs">groups.google.com/group/fakefs</a>>
|
||||
|
||||
# or
|
||||
FakeFS do
|
||||
# your code
|
||||
end
|
||||
</code></pre>
|
||||
</li>
|
||||
<li>Test: <<a
|
||||
href="http://runcoderun.com/defunkt/fakefs">runcoderun.com/defunkt/fakefs</a>>
|
||||
|
||||
<h2>RSpec</h2>
|
||||
</li>
|
||||
<li>Gems: <<a
|
||||
href="http://gemcutter.org/gems/fakefs">gemcutter.org/gems/fakefs</a>>
|
||||
|
||||
<p>The above approach works with RSpec as well. In addition to this you may use the
|
||||
'use_fakefs' macro to turn FakeFS on and off in a given example group. See
|
||||
lib/spec_helpers for more details on it's usage.</p>
|
||||
|
||||
<h2>How is this different than MockFS?</h2>
|
||||
|
||||
<p>FakeFS provides a test suite and works with symlinks. It's also strictly a
|
||||
test-time dependency: your actual library does not need to use or know about
|
||||
FakeFS.</p>
|
||||
|
||||
<h2>Caveats</h2>
|
||||
|
||||
<p>FakeFS internally uses the <code>Pathname</code> and <code>FileUtils</code> constants. If you use
|
||||
these in your app, be certain you're properly requiring them and not counting
|
||||
on FakeFS' own require.</p>
|
||||
|
||||
<h2>Speed?</h2>
|
||||
|
||||
<p><a href="http://gist.github.com/156091">http://gist.github.com/156091</a></p>
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<h3><a href="http://gemcutter.org/">Gemcutter</a></h3>
|
||||
|
||||
<pre><code>$ gem install fakefs
|
||||
</code></pre>
|
||||
|
||||
<h3><a href="http://hellorip.com">Rip</a></h3>
|
||||
|
||||
<pre><code>$ rip install git://github.com/defunkt/fakefs.git
|
||||
</code></pre>
|
||||
|
||||
<h2>Meta</h2>
|
||||
|
||||
<ul>
|
||||
<li>Code: <code>git clone git://github.com/defunkt/fakefs.git</code></li>
|
||||
<li>Home: <a href="http://github.com/defunkt/fakefs">http://github.com/defunkt/fakefs</a></li>
|
||||
<li>Docs: <a href="http://defunkt.github.com/fakefs">http://defunkt.github.com/fakefs</a></li>
|
||||
<li>Bugs: <a href="http://github.com/defunkt/fakefs/issues">http://github.com/defunkt/fakefs/issues</a></li>
|
||||
<li>List: <a href="http://groups.google.com/group/fakefs">http://groups.google.com/group/fakefs</a></li>
|
||||
<li>Test: <a href="http://runcoderun.com/defunkt/fakefs">http://runcoderun.com/defunkt/fakefs</a></li>
|
||||
<li>Gems: <a href="http://gemcutter.org/gems/fakefs">http://gemcutter.org/gems/fakefs</a></li>
|
||||
<li>Boss: Chris Wanstrath :: <a href="http://github.com/defunkt">http://github.com/defunkt</a></li>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<script type="text/javascript">$(function() {
|
||||
$('a').each(function() { $(this).attr('target', '_blank') })
|
||||
})</script>
|
||||
<p>
|
||||
[0]: <a href="http://help.github.com/forking/">help.github.com/forking/</a>
|
||||
[1]: <a
|
||||
href="http://github.com/defunkt/fakefs/issues">github.com/defunkt/fakefs/issues</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/base.rb</li>
|
||||
<li>Last modified: Wed Oct 28 09:41:53 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -61,6 +61,13 @@
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign='top'>
|
||||
<td class="attr-name">RealFileTest</td>
|
||||
<td>=</td>
|
||||
<td class="attr-value">FileTest</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign='top'>
|
||||
<td class="attr-name">RealFileUtils</td>
|
||||
<td>=</td>
|
||||
@ -75,20 +82,6 @@
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign='top'>
|
||||
<td class="attr-name">Dir</td>
|
||||
<td>=</td>
|
||||
<td class="attr-value">RealDir</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign='top'>
|
||||
<td class="attr-name">File</td>
|
||||
<td>=</td>
|
||||
<td class="attr-value">RealFile</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/dir.rb</li>
|
||||
<li>Last modified: Wed Oct 28 09:41:53 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/fake/dir.rb</li>
|
||||
<li>Last modified: Tue Oct 06 21:44:09 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/fake/file.rb</li>
|
||||
<li>Last modified: Thu Oct 29 09:14:12 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/fake/symlink.rb</li>
|
||||
<li>Last modified: Tue Oct 06 21:44:09 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/file.rb</li>
|
||||
<li>Last modified: Fri Oct 30 09:53:39 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -28,6 +28,13 @@
|
||||
|
||||
|
||||
|
||||
<div class="sectiontitle">Required Files</div>
|
||||
<ul>
|
||||
|
||||
<li>stringio</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/file_system.rb</li>
|
||||
<li>Last modified: Thu Oct 29 09:39:32 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
59
files/lib/fakefs/file_test_rb.html
Normal file
59
files/lib/fakefs/file_test_rb.html
Normal file
@ -0,0 +1,59 @@
|
||||
<?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>file_test.rb</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>
|
||||
file_test.rb
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/file_test.rb</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="bodyContent">
|
||||
<div id="content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="sectiontitle">Classes and Modules</div>
|
||||
<ul>
|
||||
|
||||
<li><span class="type">MODULE</span> <a href="../../../classes/FakeFS.html">FakeFS</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/fileutils.rb</li>
|
||||
<li>Last modified: Wed Oct 28 09:41:53 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/safe.rb</li>
|
||||
<li>Last modified: Tue Oct 06 21:44:09 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -49,6 +49,8 @@
|
||||
|
||||
<li>fakefs/file</li>
|
||||
|
||||
<li>fakefs/file_test</li>
|
||||
|
||||
<li>fakefs/dir</li>
|
||||
|
||||
</ul>
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/spec_helpers.rb</li>
|
||||
<li>Last modified: Fri Oct 30 09:54:42 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs/version.rb</li>
|
||||
<li>Last modified: Fri Oct 30 09:56:05 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
<ul class="files">
|
||||
<li>lib/fakefs.rb</li>
|
||||
<li>Last modified: Tue Oct 06 21:44:09 -0700 2009</li>
|
||||
<li>Last modified: Sat Dec 18 14:13:57 -0500 2010</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
var tree = [["","","files",[["CONTRIBUTORS","files/CONTRIBUTORS.html","",[]],["LICENSE","files/LICENSE.html","",[]],["README.markdown","files/README_markdown.html","",[]],["","","lib",[["","","fakefs",[["base.rb","files/lib/fakefs/base_rb.html","",[]],["dir.rb","files/lib/fakefs/dir_rb.html","",[]],["","","fake",[["dir.rb","files/lib/fakefs/fake/dir_rb.html","",[]],["file.rb","files/lib/fakefs/fake/file_rb.html","",[]],["symlink.rb","files/lib/fakefs/fake/symlink_rb.html","",[]]]],["file.rb","files/lib/fakefs/file_rb.html","",[]],["file_system.rb","files/lib/fakefs/file_system_rb.html","",[]],["fileutils.rb","files/lib/fakefs/fileutils_rb.html","",[]],["safe.rb","files/lib/fakefs/safe_rb.html","",[]],["spec_helpers.rb","files/lib/fakefs/spec_helpers_rb.html","",[]],["version.rb","files/lib/fakefs/version_rb.html","",[]]]],["fakefs.rb","files/lib/fakefs_rb.html","",[]]]]]],["FakeFS","classes/FakeFS.html","",[["Dir","classes/FakeFS/Dir.html"," < Object",[]],["FakeDir","classes/FakeFS/FakeDir.html"," < Hash",[]],["FakeFile","classes/FakeFS/FakeFile.html"," < Object",[["Inode","classes/FakeFS/FakeFile/Inode.html"," < Object",[]]]],["FakeSymlink","classes/FakeFS/FakeSymlink.html"," < Object",[]],["File","classes/FakeFS/File.html"," < Object",[["Stat","classes/FakeFS/File/Stat.html"," < Object",[]]]],["FileSystem","classes/FakeFS/FileSystem.html","",[]],["FileUtils","classes/FakeFS/FileUtils.html","",[]],["SpecHelpers","classes/FakeFS/SpecHelpers.html","",[]],["Version","classes/FakeFS/Version.html","",[]]]],["Object","classes/Object.html"," < Object",[]]]
|
||||
var tree = [["","","files",[["CONTRIBUTORS","files/CONTRIBUTORS.html","",[]],["LICENSE","files/LICENSE.html","",[]],["README.markdown","files/README_markdown.html","",[]],["","","lib",[["","","fakefs",[["base.rb","files/lib/fakefs/base_rb.html","",[]],["dir.rb","files/lib/fakefs/dir_rb.html","",[]],["","","fake",[["dir.rb","files/lib/fakefs/fake/dir_rb.html","",[]],["file.rb","files/lib/fakefs/fake/file_rb.html","",[]],["symlink.rb","files/lib/fakefs/fake/symlink_rb.html","",[]]]],["file.rb","files/lib/fakefs/file_rb.html","",[]],["file_system.rb","files/lib/fakefs/file_system_rb.html","",[]],["file_test.rb","files/lib/fakefs/file_test_rb.html","",[]],["fileutils.rb","files/lib/fakefs/fileutils_rb.html","",[]],["safe.rb","files/lib/fakefs/safe_rb.html","",[]],["spec_helpers.rb","files/lib/fakefs/spec_helpers_rb.html","",[]],["version.rb","files/lib/fakefs/version_rb.html","",[]]]],["fakefs.rb","files/lib/fakefs_rb.html","",[]]]]]],["FakeFS","classes/FakeFS.html","",[["Dir","classes/FakeFS/Dir.html"," < Object",[]],["FakeDir","classes/FakeFS/FakeDir.html"," < Hash",[]],["FakeFile","classes/FakeFS/FakeFile.html"," < Object",[["Inode","classes/FakeFS/FakeFile/Inode.html"," < Object",[]]]],["FakeSymlink","classes/FakeFS/FakeSymlink.html"," < Object",[]],["File","classes/FakeFS/File.html"," < StringIO",[["Stat","classes/FakeFS/File/Stat.html"," < Object",[]]]],["FileSystem","classes/FakeFS/FileSystem.html","",[]],["FileTest","classes/FakeFS/FileTest.html"," < Object",[]],["FileUtils","classes/FakeFS/FileUtils.html","",[]],["SpecHelpers","classes/FakeFS/SpecHelpers.html","",[]],["Version","classes/FakeFS/Version.html","",[]]]],["Object","classes/Object.html"," < Object",[]]]
|
Loading…
Reference in New Issue
Block a user