folio 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +675 -0
- data/MANIFEST +234 -0
- data/METADATA +8 -0
- data/NEWS +9 -0
- data/README +69 -0
- data/demo/sample1/foo/foo.txt +1 -0
- data/demo/sample1/tryme.rb +14 -0
- data/doc/rdoc/classes/Folio/BlockDevice.html +117 -0
- data/doc/rdoc/classes/Folio/CharacterDevice.html +117 -0
- data/doc/rdoc/classes/Folio/Device.html +119 -0
- data/doc/rdoc/classes/Folio/Directory.html +420 -0
- data/doc/rdoc/classes/Folio/Document.html +261 -0
- data/doc/rdoc/classes/Folio/FileNotFound.html +92 -0
- data/doc/rdoc/classes/Folio/FileObject.html +1200 -0
- data/doc/rdoc/classes/Folio/Link.html +238 -0
- data/doc/rdoc/classes/Folio/Pipe.html +131 -0
- data/doc/rdoc/classes/Folio/Prompt.html +796 -0
- data/doc/rdoc/classes/Folio/Socket.html +115 -0
- data/doc/rdoc/classes/Folio.html +148 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +992 -0
- data/doc/rdoc/files/METADATA.html +101 -0
- data/doc/rdoc/files/NEWS.html +102 -0
- data/doc/rdoc/files/README.html +171 -0
- data/doc/rdoc/files/lib/folio/device_rb.html +96 -0
- data/doc/rdoc/files/lib/folio/directory_rb.html +96 -0
- data/doc/rdoc/files/lib/folio/document_rb.html +96 -0
- data/doc/rdoc/files/lib/folio/errors_rb.html +92 -0
- data/doc/rdoc/files/lib/folio/fileobject_rb.html +92 -0
- data/doc/rdoc/files/lib/folio/link_rb.html +96 -0
- data/doc/rdoc/files/lib/folio/pipe_rb.html +96 -0
- data/doc/rdoc/files/lib/folio/prompt_rb.html +92 -0
- data/doc/rdoc/files/lib/folio/socket_rb.html +96 -0
- data/doc/rdoc/files/lib/folio_rb.html +105 -0
- data/doc/rdoc/fr_class_index.html +58 -0
- data/doc/rdoc/fr_file_index.html +60 -0
- data/doc/rdoc/fr_method_index.html +185 -0
- data/doc/rdoc/index.html +26 -0
- data/doc/rdoc/rdoc-style.css +175 -0
- data/doc/ri/Folio/BlockDevice/blockdev%3f-i.yaml +10 -0
- data/doc/ri/Folio/BlockDevice/cdesc-BlockDevice.yaml +18 -0
- data/doc/ri/Folio/CharacterDevice/cdesc-CharacterDevice.yaml +18 -0
- data/doc/ri/Folio/CharacterDevice/chardev%3f-i.yaml +10 -0
- data/doc/ri/Folio/Device/cdesc-Device.yaml +18 -0
- data/doc/ri/Folio/Device/new-c.yaml +10 -0
- data/doc/ri/Folio/Directory/%2b-i.yaml +12 -0
- data/doc/ri/Folio/Directory/%2f-i.yaml +13 -0
- data/doc/ri/Folio/Directory/cd-i.yaml +12 -0
- data/doc/ri/Folio/Directory/cdesc-Directory.yaml +49 -0
- data/doc/ri/Folio/Directory/chdir-i.yaml +11 -0
- data/doc/ri/Folio/Directory/chmod_r-i.yaml +10 -0
- data/doc/ri/Folio/Directory/chown_r-i.yaml +12 -0
- data/doc/ri/Folio/Directory/chroot-i.yaml +10 -0
- data/doc/ri/Folio/Directory/cp_r-i.yaml +12 -0
- data/doc/ri/Folio/Directory/delete-i.yaml +12 -0
- data/doc/ri/Folio/Directory/directory%3f-i.yaml +10 -0
- data/doc/ri/Folio/Directory/entries-i.yaml +12 -0
- data/doc/ri/Folio/Directory/foreach-i.yaml +10 -0
- data/doc/ri/Folio/Directory/new-c.yaml +10 -0
- data/doc/ri/Folio/Directory/paths-i.yaml +12 -0
- data/doc/ri/Folio/Directory/rm_r-i.yaml +10 -0
- data/doc/ri/Folio/Directory/rm_rf-i.yaml +10 -0
- data/doc/ri/Folio/Directory/rmdir-i.yaml +13 -0
- data/doc/ri/Folio/Directory/unlink-i.yaml +12 -0
- data/doc/ri/Folio/Document/cdesc-Document.yaml +34 -0
- data/doc/ri/Folio/Document/delete-i.yaml +10 -0
- data/doc/ri/Folio/Document/executable%3f-i.yaml +10 -0
- data/doc/ri/Folio/Document/executable_real%3f-i.yaml +10 -0
- data/doc/ri/Folio/Document/file%3f-i.yaml +10 -0
- data/doc/ri/Folio/Document/intialize-i.yaml +10 -0
- data/doc/ri/Folio/Document/open-i.yaml +10 -0
- data/doc/ri/Folio/Document/read-i.yaml +10 -0
- data/doc/ri/Folio/Document/readlines-i.yaml +10 -0
- data/doc/ri/Folio/Document/truncate-i.yaml +10 -0
- data/doc/ri/Folio/Document/unlink-i.yaml +12 -0
- data/doc/ri/Folio/FileNotFound/cdesc-FileNotFound.yaml +15 -0
- data/doc/ri/Folio/FileObject/%3c%3d%3e-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/%3d%3d-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/%5b%5d-c.yaml +12 -0
- data/doc/ri/Folio/FileObject/atime-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/basename-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/blockdev%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/cdesc-FileObject.yaml +154 -0
- data/doc/ri/Folio/FileObject/chardev%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/chmod-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/chown-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/cp-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/ctime-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/delete-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/delete_force-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/directory%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/dirname-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/exist%3f-i.yaml +13 -0
- data/doc/ri/Folio/FileObject/exists%3f-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/extname-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/file%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/fnmatch%3f-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/fnmatch-i.yaml +11 -0
- data/doc/ri/Folio/FileObject/grpowned%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/identical%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/inspect-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/install-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/link-i.yaml +11 -0
- data/doc/ri/Folio/FileObject/link_force-i.yaml +11 -0
- data/doc/ri/Folio/FileObject/ln-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/ln_f-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/ln_s-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/ln_sf-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/mtime-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/mv-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/new-c.yaml +10 -0
- data/doc/ri/Folio/FileObject/owned%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/pipe%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/readable%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/readable_real%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/relative-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/rename-i.yaml +11 -0
- data/doc/ri/Folio/FileObject/restat-i.yaml +13 -0
- data/doc/ri/Folio/FileObject/rm-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/rm_f-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/setgid%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/setuid%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/size%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/size-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/socket%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/split-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/stat%21-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/stat-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/sticky%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/symlink-i.yaml +11 -0
- data/doc/ri/Folio/FileObject/symlink_force-i.yaml +11 -0
- data/doc/ri/Folio/FileObject/to_s-i.yaml +12 -0
- data/doc/ri/Folio/FileObject/touch-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/unlink-i.yaml +15 -0
- data/doc/ri/Folio/FileObject/unlink_force-i.yaml +13 -0
- data/doc/ri/Folio/FileObject/util-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/utime-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/writable%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/writable_real%3f-i.yaml +10 -0
- data/doc/ri/Folio/FileObject/zero%3f-i.yaml +10 -0
- data/doc/ri/Folio/Link/cdesc-Link.yaml +29 -0
- data/doc/ri/Folio/Link/lchmod-i.yaml +10 -0
- data/doc/ri/Folio/Link/lchown-i.yaml +10 -0
- data/doc/ri/Folio/Link/link%3f-i.yaml +10 -0
- data/doc/ri/Folio/Link/lstat-i.yaml +10 -0
- data/doc/ri/Folio/Link/method_missing-i.yaml +11 -0
- data/doc/ri/Folio/Link/new-c.yaml +10 -0
- data/doc/ri/Folio/Link/readlink-i.yaml +10 -0
- data/doc/ri/Folio/Link/symlink%3f-i.yaml +10 -0
- data/doc/ri/Folio/Pipe/cdesc-Pipe.yaml +17 -0
- data/doc/ri/Folio/Pipe/new-c.yaml +10 -0
- data/doc/ri/Folio/Pipe/pipe%3f-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/%2b-i.yaml +13 -0
- data/doc/ri/Folio/Prompt/%2f-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/%5b%5d-c.yaml +10 -0
- data/doc/ri/Folio/Prompt/cd-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/cdesc-Prompt.yaml +89 -0
- data/doc/ri/Folio/Prompt/chmod-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/chmod_r-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/chown-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/chown_r-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/cp-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/cp_r-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/directories-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/entries-i.yaml +13 -0
- data/doc/ri/Folio/Prompt/file-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/files-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/fileutils-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/glob-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/install-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/ln-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/ln_s-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/ln_sf-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/localize-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/ls-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/mkdir-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/mkdir_p-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/mode-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/mv-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/new-c.yaml +11 -0
- data/doc/ri/Folio/Prompt/paths-i.yaml +12 -0
- data/doc/ri/Folio/Prompt/pwd-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/rm-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/rm_r-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/rm_rf-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/rmdir-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/to_s-i.yaml +10 -0
- data/doc/ri/Folio/Prompt/touch-i.yaml +12 -0
- data/doc/ri/Folio/Socket/cdesc-Socket.yaml +16 -0
- data/doc/ri/Folio/Socket/new-c.yaml +10 -0
- data/doc/ri/Folio/cdesc-Folio.yaml +15 -0
- data/doc/ri/created.rid +1 -0
- data/lib/folio/device.rb +29 -0
- data/lib/folio/directory.rb +83 -0
- data/lib/folio/document.rb +66 -0
- data/lib/folio/errors.rb +7 -0
- data/lib/folio/fileobject.rb +242 -0
- data/lib/folio/link.rb +49 -0
- data/lib/folio/pipe.rb +16 -0
- data/lib/folio/prompt.rb +239 -0
- data/lib/folio/socket.rb +14 -0
- data/lib/folio.rb +79 -0
- data/test/fixture/bar.txt +0 -0
- data/test/fixture/foo.txt +0 -0
- data/test/test_folio.rb +28 -0
- data/test/test_helper.rb +7 -0
- metadata +300 -0
@@ -0,0 +1,261 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: Folio::Document</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />Folio::Document</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../files/lib/folio/document_rb.html">lib/folio/document.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
<a href="FileObject.html">
|
67
|
+
FileObject
|
68
|
+
</a>
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</td>
|
73
|
+
</tr>
|
74
|
+
</table>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
<div id="content">
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
<div class="sectiontitle">Methods</div>
|
84
|
+
<ul>
|
85
|
+
<li><a href="#M000136">delete</a></li>
|
86
|
+
<li><a href="#M000131">executable?</a></li>
|
87
|
+
<li><a href="#M000132">executable_real?</a></li>
|
88
|
+
<li><a href="#M000130">file?</a></li>
|
89
|
+
<li><a href="#M000129">intialize</a></li>
|
90
|
+
<li><a href="#M000137">open</a></li>
|
91
|
+
<li><a href="#M000133">read</a></li>
|
92
|
+
<li><a href="#M000134">readlines</a></li>
|
93
|
+
<li><a href="#M000138">truncate</a></li>
|
94
|
+
<li><a href="#M000135">unlink</a></li>
|
95
|
+
</ul>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<div class="sectiontitle">Public Instance methods</div>
|
103
|
+
<div class="method">
|
104
|
+
<div class="title">
|
105
|
+
<a name="M000136"></a><b>delete</b>()
|
106
|
+
</div>
|
107
|
+
<div class="sourcecode">
|
108
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000136_source')" id="l_M000136_source">show source</a> ]</p>
|
109
|
+
<div id="M000136_source" class="dyn-source">
|
110
|
+
<pre>
|
111
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 36</span>
|
112
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
113
|
+
</pre>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="method">
|
118
|
+
<div class="title">
|
119
|
+
<a name="M000131"></a><b>executable?</b>()
|
120
|
+
</div>
|
121
|
+
<div class="sourcecode">
|
122
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000131_source')" id="l_M000131_source">show source</a> ]</p>
|
123
|
+
<div id="M000131_source" class="dyn-source">
|
124
|
+
<pre>
|
125
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 23</span>
|
126
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">executable?</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">executable?</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
127
|
+
</pre>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
<div class="method">
|
132
|
+
<div class="title">
|
133
|
+
<a name="M000132"></a><b>executable_real?</b>()
|
134
|
+
</div>
|
135
|
+
<div class="sourcecode">
|
136
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000132_source')" id="l_M000132_source">show source</a> ]</p>
|
137
|
+
<div id="M000132_source" class="dyn-source">
|
138
|
+
<pre>
|
139
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 24</span>
|
140
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">executable_real?</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">executable_real?</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
141
|
+
</pre>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
<div class="method">
|
146
|
+
<div class="title">
|
147
|
+
<a name="M000130"></a><b>file?</b>()
|
148
|
+
</div>
|
149
|
+
<div class="sourcecode">
|
150
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000130_source')" id="l_M000130_source">show source</a> ]</p>
|
151
|
+
<div id="M000130_source" class="dyn-source">
|
152
|
+
<pre>
|
153
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 17</span>
|
154
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file?</span> ; <span class="ruby-keyword kw">true</span> ; <span class="ruby-keyword kw">end</span>
|
155
|
+
</pre>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
<div class="method">
|
160
|
+
<div class="title">
|
161
|
+
<a name="M000129"></a><b>intialize</b>(path)
|
162
|
+
</div>
|
163
|
+
<div class="sourcecode">
|
164
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000129_source')" id="l_M000129_source">show source</a> ]</p>
|
165
|
+
<div id="M000129_source" class="dyn-source">
|
166
|
+
<pre>
|
167
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 7</span>
|
168
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">intialize</span>(<span class="ruby-identifier">path</span>)
|
169
|
+
<span class="ruby-keyword kw">super</span>
|
170
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">FileNotFound</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-ivar">@path</span>)
|
171
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">FileNotFound</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-ivar">@path</span>)
|
172
|
+
<span class="ruby-keyword kw">end</span>
|
173
|
+
</pre>
|
174
|
+
</div>
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
<div class="method">
|
178
|
+
<div class="title">
|
179
|
+
<a name="M000137"></a><b>open</b>(mode, &block)
|
180
|
+
</div>
|
181
|
+
<div class="sourcecode">
|
182
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000137_source')" id="l_M000137_source">show source</a> ]</p>
|
183
|
+
<div id="M000137_source" class="dyn-source">
|
184
|
+
<pre>
|
185
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 42</span>
|
186
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-identifier">mode</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
187
|
+
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
188
|
+
<span class="ruby-keyword kw">end</span>
|
189
|
+
</pre>
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
</div>
|
193
|
+
<div class="method">
|
194
|
+
<div class="title">
|
195
|
+
<a name="M000133"></a><b>read</b>()
|
196
|
+
</div>
|
197
|
+
<div class="sourcecode">
|
198
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000133_source')" id="l_M000133_source">show source</a> ]</p>
|
199
|
+
<div id="M000133_source" class="dyn-source">
|
200
|
+
<pre>
|
201
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 30</span>
|
202
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
203
|
+
</pre>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
<div class="method">
|
208
|
+
<div class="title">
|
209
|
+
<a name="M000134"></a><b>readlines</b>()
|
210
|
+
</div>
|
211
|
+
<div class="sourcecode">
|
212
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000134_source')" id="l_M000134_source">show source</a> ]</p>
|
213
|
+
<div id="M000134_source" class="dyn-source">
|
214
|
+
<pre>
|
215
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 32</span>
|
216
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readlines</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">readlines</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
217
|
+
</pre>
|
218
|
+
</div>
|
219
|
+
</div>
|
220
|
+
</div>
|
221
|
+
<div class="method">
|
222
|
+
<div class="title">
|
223
|
+
<a name="M000138"></a><b>truncate</b>(size)
|
224
|
+
</div>
|
225
|
+
<div class="sourcecode">
|
226
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000138_source')" id="l_M000138_source">show source</a> ]</p>
|
227
|
+
<div id="M000138_source" class="dyn-source">
|
228
|
+
<pre>
|
229
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 46</span>
|
230
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">truncate</span>(<span class="ruby-identifier">size</span>)
|
231
|
+
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">'w'</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">truncate</span>(<span class="ruby-identifier">size</span>)}
|
232
|
+
<span class="ruby-keyword kw">end</span>
|
233
|
+
</pre>
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
</div>
|
237
|
+
<div class="method">
|
238
|
+
<div class="title">
|
239
|
+
<a name="M000135"></a><b>unlink</b>()
|
240
|
+
</div>
|
241
|
+
<div class="description">
|
242
|
+
<p>
|
243
|
+
TODO: how to handle unkinking (b/c file no longer exists)
|
244
|
+
</p>
|
245
|
+
</div>
|
246
|
+
<div class="sourcecode">
|
247
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000135_source')" id="l_M000135_source">show source</a> ]</p>
|
248
|
+
<div id="M000135_source" class="dyn-source">
|
249
|
+
<pre>
|
250
|
+
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 35</span>
|
251
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlink</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
252
|
+
</pre>
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
</div>
|
259
|
+
|
260
|
+
</body>
|
261
|
+
</html>
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: Folio::FileNotFound</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />Folio::FileNotFound</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../files/lib/folio/errors_rb.html">lib/folio/errors.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
::IOError
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
</body>
|
92
|
+
</html>
|