fakefs/classes/FakeFS/FakeFile/Inode.html
2010-12-18 14:13:33 -05:00

230 lines
7.8 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>FakeFS::FakeFile::Inode</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::FakeFile::Inode
<span class="parent">&lt;
<a href="../../Object.html">Object</a>
</span>
</h1>
<ul class="files">
<li><a href="../../../files/lib/fakefs/fake/file_rb.html">lib/fakefs/fake/file.rb</a></li>
</ul>
</div>
<div id="bodyContent">
<div id="content">
<div class="sectiontitle">Methods</div>
<dl class="methods">
<dt>C</dt>
<dd>
<ul>
<li><a href="#M000032">clone</a></li>
</ul>
</dd>
<dt>L</dt>
<dd>
<ul>
<li><a href="#M000030">link</a></li>
</ul>
</dd>
<dt>N</dt>
<dd>
<ul>
<li><a href="#M000029">new</a></li>
</ul>
</dd>
<dt>U</dt>
<dd>
<ul>
<li><a href="#M000031">unlink</a></li>
</ul>
</dd>
</dl>
<div class="sectiontitle">Attributes</div>
<table border='0' cellpadding='5'>
<tr valign='top'>
<td class='attr-rw'>
[RW]
</td>
<td class='attr-name'>content</td>
<td class='attr-desc'></td>
</tr>
<tr valign='top'>
<td class='attr-rw'>
[RW]
</td>
<td class='attr-name'>links</td>
<td class='attr-desc'></td>
</tr>
</table>
<div class="sectiontitle">Class Public methods</div>
<div class="method">
<div class="title" id="M000029">
<a name="M000029"></a><b>new</b>(file_owner)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show</a>
</p>
<div id="M000029_source" class="dyn-source">
<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">&quot;&quot;</span>
<span class="ruby-ivar">@links</span> = [<span class="ruby-identifier">file_owner</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="M000032">
<a name="M000032"></a><b>clone</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
</p>
<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>
<span class="ruby-identifier">clone</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000030">
<a name="M000030"></a><b>link</b>(file)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show</a>
</p>
<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">&lt;&lt;</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>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000031">
<a name="M000031"></a><b>unlink</b>(file)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show</a>
</p>
<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>
</div>
</div>
</div>
</div>
</div>
</body>
</html>