folio 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +12 -0
- data/MANIFEST +13 -227
- data/NEWS +8 -6
- data/TODO +8 -0
- data/VERSION +1 -0
- data/doc/book/basedir-spec-0.6.html +138 -0
- data/lib/folio.rb +16 -5
- data/lib/folio/directory.rb +8 -3
- data/lib/folio/document.rb +4 -0
- data/lib/folio/errors.rb +3 -0
- data/lib/folio/fileobject.rb +19 -10
- data/lib/folio/link.rb +10 -4
- data/lib/folio/pipe.rb +4 -0
- data/lib/folio/{prompt.rb → shell.rb} +92 -21
- data/lib/folio/xdg.rb +136 -0
- data/meta/abstract +1 -0
- data/meta/authors +1 -0
- data/meta/contact +1 -0
- data/meta/homepage +1 -0
- data/meta/releases +2 -0
- data/meta/summary +1 -0
- metadata +26 -239
- data/METADATA +0 -9
- data/doc/rdoc/classes/Enumerator.html +0 -92
- data/doc/rdoc/classes/Folio.html +0 -158
- data/doc/rdoc/classes/Folio/BlockDevice.html +0 -117
- data/doc/rdoc/classes/Folio/CharacterDevice.html +0 -117
- data/doc/rdoc/classes/Folio/Device.html +0 -119
- data/doc/rdoc/classes/Folio/Directory.html +0 -548
- data/doc/rdoc/classes/Folio/Document.html +0 -340
- data/doc/rdoc/classes/Folio/FileNotFound.html +0 -92
- data/doc/rdoc/classes/Folio/FileObject.html +0 -1205
- data/doc/rdoc/classes/Folio/Link.html +0 -238
- data/doc/rdoc/classes/Folio/Pipe.html +0 -131
- data/doc/rdoc/classes/Folio/Prompt.html +0 -839
- data/doc/rdoc/classes/Folio/Socket.html +0 -115
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/CHANGES.html +0 -92
- data/doc/rdoc/files/COPYING.html +0 -992
- data/doc/rdoc/files/METADATA.html +0 -102
- data/doc/rdoc/files/NEWS.html +0 -102
- data/doc/rdoc/files/README.html +0 -171
- data/doc/rdoc/files/lib/folio/device_rb.html +0 -96
- data/doc/rdoc/files/lib/folio/directory_rb.html +0 -96
- data/doc/rdoc/files/lib/folio/document_rb.html +0 -96
- data/doc/rdoc/files/lib/folio/errors_rb.html +0 -92
- data/doc/rdoc/files/lib/folio/fileobject_rb.html +0 -97
- data/doc/rdoc/files/lib/folio/link_rb.html +0 -96
- data/doc/rdoc/files/lib/folio/pipe_rb.html +0 -96
- data/doc/rdoc/files/lib/folio/prompt_rb.html +0 -92
- data/doc/rdoc/files/lib/folio/socket_rb.html +0 -96
- data/doc/rdoc/files/lib/folio_rb.html +0 -105
- data/doc/rdoc/fr_class_index.html +0 -59
- data/doc/rdoc/fr_file_index.html +0 -61
- data/doc/rdoc/fr_method_index.html +0 -195
- data/doc/rdoc/index.html +0 -26
- data/doc/rdoc/rdoc-style.css +0 -175
- data/doc/ri/Enumerator/cdesc-Enumerator.yaml +0 -15
- data/doc/ri/Folio/BlockDevice/blockdev%3f-i.yaml +0 -10
- data/doc/ri/Folio/BlockDevice/cdesc-BlockDevice.yaml +0 -18
- data/doc/ri/Folio/CharacterDevice/cdesc-CharacterDevice.yaml +0 -18
- data/doc/ri/Folio/CharacterDevice/chardev%3f-i.yaml +0 -10
- data/doc/ri/Folio/Device/cdesc-Device.yaml +0 -18
- data/doc/ri/Folio/Device/new-c.yaml +0 -10
- data/doc/ri/Folio/Directory/%2b-i.yaml +0 -12
- data/doc/ri/Folio/Directory/%2f-i.yaml +0 -13
- data/doc/ri/Folio/Directory/cd-i.yaml +0 -12
- data/doc/ri/Folio/Directory/cdesc-Directory.yaml +0 -57
- data/doc/ri/Folio/Directory/chdir-i.yaml +0 -13
- data/doc/ri/Folio/Directory/chmod_r-i.yaml +0 -12
- data/doc/ri/Folio/Directory/chown_r-i.yaml +0 -12
- data/doc/ri/Folio/Directory/chroot-i.yaml +0 -12
- data/doc/ri/Folio/Directory/cp_r-i.yaml +0 -12
- data/doc/ri/Folio/Directory/delete-i.yaml +0 -12
- data/doc/ri/Folio/Directory/directories-i.yaml +0 -12
- data/doc/ri/Folio/Directory/directory%3f-i.yaml +0 -10
- data/doc/ri/Folio/Directory/directory_entries-i.yaml +0 -12
- data/doc/ri/Folio/Directory/document_entries-i.yaml +0 -12
- data/doc/ri/Folio/Directory/documents-i.yaml +0 -12
- data/doc/ri/Folio/Directory/entries-i.yaml +0 -12
- data/doc/ri/Folio/Directory/files-i.yaml +0 -12
- data/doc/ri/Folio/Directory/foreach-i.yaml +0 -12
- data/doc/ri/Folio/Directory/new-c.yaml +0 -10
- data/doc/ri/Folio/Directory/rm_r-i.yaml +0 -12
- data/doc/ri/Folio/Directory/rm_rf-i.yaml +0 -12
- data/doc/ri/Folio/Directory/rmdir-i.yaml +0 -15
- data/doc/ri/Folio/Directory/unlink-i.yaml +0 -12
- data/doc/ri/Folio/Document/%3c%3c-i.yaml +0 -12
- data/doc/ri/Folio/Document/%3c-i.yaml +0 -12
- data/doc/ri/Folio/Document/append-i.yaml +0 -13
- data/doc/ri/Folio/Document/cdesc-Document.yaml +0 -42
- data/doc/ri/Folio/Document/delete-i.yaml +0 -10
- data/doc/ri/Folio/Document/document%3f-i.yaml +0 -12
- data/doc/ri/Folio/Document/executable%3f-i.yaml +0 -10
- data/doc/ri/Folio/Document/executable_real%3f-i.yaml +0 -10
- data/doc/ri/Folio/Document/intialize-i.yaml +0 -10
- data/doc/ri/Folio/Document/open-i.yaml +0 -10
- data/doc/ri/Folio/Document/read-i.yaml +0 -10
- data/doc/ri/Folio/Document/readlines-i.yaml +0 -10
- data/doc/ri/Folio/Document/truncate-i.yaml +0 -10
- data/doc/ri/Folio/Document/unlink-i.yaml +0 -12
- data/doc/ri/Folio/Document/write-i.yaml +0 -13
- data/doc/ri/Folio/FileNotFound/cdesc-FileNotFound.yaml +0 -15
- data/doc/ri/Folio/FileObject/%3c%3d%3e-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/%3d%3d-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/%5b%5d-c.yaml +0 -12
- data/doc/ri/Folio/FileObject/atime-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/basename-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/blockdev%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/cdesc-FileObject.yaml +0 -154
- data/doc/ri/Folio/FileObject/chardev%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/chmod-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/chown-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/cp-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/ctime-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/delete-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/delete_force-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/directory%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/dirname-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/document%3f-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/exist%3f-i.yaml +0 -13
- data/doc/ri/Folio/FileObject/exists%3f-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/extname-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/fnmatch%3f-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/fnmatch-i.yaml +0 -11
- data/doc/ri/Folio/FileObject/grpowned%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/identical%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/inspect-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/install-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/link-i.yaml +0 -11
- data/doc/ri/Folio/FileObject/link_force-i.yaml +0 -11
- data/doc/ri/Folio/FileObject/ln-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/ln_f-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/ln_s-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/ln_sf-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/mtime-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/mv-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/new-c.yaml +0 -10
- data/doc/ri/Folio/FileObject/owned%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/pipe%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/readable%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/readable_real%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/relative-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/rename-i.yaml +0 -11
- data/doc/ri/Folio/FileObject/restat-i.yaml +0 -13
- data/doc/ri/Folio/FileObject/rm-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/rm_f-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/setgid%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/setuid%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/size%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/size-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/socket%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/split-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/stat%21-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/stat-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/sticky%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/symlink-i.yaml +0 -11
- data/doc/ri/Folio/FileObject/symlink_force-i.yaml +0 -11
- data/doc/ri/Folio/FileObject/to_s-i.yaml +0 -12
- data/doc/ri/Folio/FileObject/touch-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/unlink-i.yaml +0 -15
- data/doc/ri/Folio/FileObject/unlink_force-i.yaml +0 -13
- data/doc/ri/Folio/FileObject/util-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/utime-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/writable%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/writable_real%3f-i.yaml +0 -10
- data/doc/ri/Folio/FileObject/zero%3f-i.yaml +0 -10
- data/doc/ri/Folio/Link/cdesc-Link.yaml +0 -29
- data/doc/ri/Folio/Link/lchmod-i.yaml +0 -10
- data/doc/ri/Folio/Link/lchown-i.yaml +0 -10
- data/doc/ri/Folio/Link/link%3f-i.yaml +0 -10
- data/doc/ri/Folio/Link/lstat-i.yaml +0 -10
- data/doc/ri/Folio/Link/method_missing-i.yaml +0 -11
- data/doc/ri/Folio/Link/new-c.yaml +0 -10
- data/doc/ri/Folio/Link/readlink-i.yaml +0 -10
- data/doc/ri/Folio/Link/symlink%3f-i.yaml +0 -10
- data/doc/ri/Folio/Pipe/cdesc-Pipe.yaml +0 -17
- data/doc/ri/Folio/Pipe/new-c.yaml +0 -10
- data/doc/ri/Folio/Pipe/pipe%3f-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/%2b-i.yaml +0 -13
- data/doc/ri/Folio/Prompt/%2f-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/%5b%5d-c.yaml +0 -10
- data/doc/ri/Folio/Prompt/%5b%5d-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/cd-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/cdesc-Prompt.yaml +0 -95
- data/doc/ri/Folio/Prompt/chmod-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/chmod_r-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/chown-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/chown_r-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/cp-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/cp_r-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/directories-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/directory_entries-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/document_entries-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/documents-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/entries-i.yaml +0 -13
- data/doc/ri/Folio/Prompt/file-i.yaml +0 -13
- data/doc/ri/Folio/Prompt/files-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/fileutils-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/glob-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/install-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/ln-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/ln_s-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/ln_sf-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/localize-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/ls-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/mkdir-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/mkdir_p-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/mode-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/mv-i.yaml +0 -12
- data/doc/ri/Folio/Prompt/new-c.yaml +0 -11
- data/doc/ri/Folio/Prompt/rm-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/rm_r-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/rm_rf-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/rmdir-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/to_s-i.yaml +0 -10
- data/doc/ri/Folio/Prompt/touch-i.yaml +0 -12
- data/doc/ri/Folio/Socket/cdesc-Socket.yaml +0 -16
- data/doc/ri/Folio/Socket/new-c.yaml +0 -10
- data/doc/ri/Folio/cdesc-Folio.yaml +0 -15
- data/doc/ri/created.rid +0 -1
- data/test/fixture/bar.txt +0 -0
- data/test/fixture/foo.txt +0 -0
- data/test/test_folio.rb +0 -28
- data/test/test_helper.rb +0 -7
@@ -1,340 +0,0 @@
|
|
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="#M000146"><</a></li>
|
86
|
-
<li><a href="#M000148"><<</a></li>
|
87
|
-
<li><a href="#M000147">append</a></li>
|
88
|
-
<li><a href="#M000142">delete</a></li>
|
89
|
-
<li><a href="#M000136">document?</a></li>
|
90
|
-
<li><a href="#M000137">executable?</a></li>
|
91
|
-
<li><a href="#M000138">executable_real?</a></li>
|
92
|
-
<li><a href="#M000135">intialize</a></li>
|
93
|
-
<li><a href="#M000143">open</a></li>
|
94
|
-
<li><a href="#M000139">read</a></li>
|
95
|
-
<li><a href="#M000140">readlines</a></li>
|
96
|
-
<li><a href="#M000144">truncate</a></li>
|
97
|
-
<li><a href="#M000141">unlink</a></li>
|
98
|
-
<li><a href="#M000145">write</a></li>
|
99
|
-
</ul>
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<div class="sectiontitle">Public Instance methods</div>
|
107
|
-
<div class="method">
|
108
|
-
<div class="title">
|
109
|
-
<a name="M000146"></a><b><</b>(string)
|
110
|
-
</div>
|
111
|
-
<div class="description">
|
112
|
-
<p>
|
113
|
-
Alias for <a href="Document.html#M000145">write</a>
|
114
|
-
</p>
|
115
|
-
</div>
|
116
|
-
</div>
|
117
|
-
<div class="method">
|
118
|
-
<div class="title">
|
119
|
-
<a name="M000148"></a><b><<</b>(string)
|
120
|
-
</div>
|
121
|
-
<div class="description">
|
122
|
-
<p>
|
123
|
-
Alias for <a href="Document.html#M000147">append</a>
|
124
|
-
</p>
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
<div class="method">
|
128
|
-
<div class="title">
|
129
|
-
<a name="M000147"></a><b>append</b>(string)
|
130
|
-
</div>
|
131
|
-
<div class="description">
|
132
|
-
<p>
|
133
|
-
Replace contents of file with string.
|
134
|
-
</p>
|
135
|
-
</div>
|
136
|
-
<div class="aka">
|
137
|
-
This method is also aliased as
|
138
|
-
<a href="Document.html#M000148"><<</a>
|
139
|
-
</div>
|
140
|
-
<div class="sourcecode">
|
141
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000147_source')" id="l_M000147_source">show source</a> ]</p>
|
142
|
-
<div id="M000147_source" class="dyn-source">
|
143
|
-
<pre>
|
144
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 58</span>
|
145
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">append</span>(<span class="ruby-identifier">string</span>)
|
146
|
-
<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">'a'</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">write</span>(<span class="ruby-identifier">string</span>)}
|
147
|
-
<span class="ruby-keyword kw">end</span>
|
148
|
-
</pre>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
<div class="method">
|
153
|
-
<div class="title">
|
154
|
-
<a name="M000142"></a><b>delete</b>()
|
155
|
-
</div>
|
156
|
-
<div class="sourcecode">
|
157
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000142_source')" id="l_M000142_source">show source</a> ]</p>
|
158
|
-
<div id="M000142_source" class="dyn-source">
|
159
|
-
<pre>
|
160
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 37</span>
|
161
|
-
<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>
|
162
|
-
</pre>
|
163
|
-
</div>
|
164
|
-
</div>
|
165
|
-
</div>
|
166
|
-
<div class="method">
|
167
|
-
<div class="title">
|
168
|
-
<a name="M000136"></a><b>document?</b>()
|
169
|
-
</div>
|
170
|
-
<div class="description">
|
171
|
-
<p>
|
172
|
-
def file? ; true ; end
|
173
|
-
</p>
|
174
|
-
</div>
|
175
|
-
<div class="sourcecode">
|
176
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000136_source')" id="l_M000136_source">show source</a> ]</p>
|
177
|
-
<div id="M000136_source" class="dyn-source">
|
178
|
-
<pre>
|
179
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 18</span>
|
180
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">document?</span> ; <span class="ruby-keyword kw">true</span> ; <span class="ruby-keyword kw">end</span>
|
181
|
-
</pre>
|
182
|
-
</div>
|
183
|
-
</div>
|
184
|
-
</div>
|
185
|
-
<div class="method">
|
186
|
-
<div class="title">
|
187
|
-
<a name="M000137"></a><b>executable?</b>()
|
188
|
-
</div>
|
189
|
-
<div class="sourcecode">
|
190
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000137_source')" id="l_M000137_source">show source</a> ]</p>
|
191
|
-
<div id="M000137_source" class="dyn-source">
|
192
|
-
<pre>
|
193
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 24</span>
|
194
|
-
<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>
|
195
|
-
</pre>
|
196
|
-
</div>
|
197
|
-
</div>
|
198
|
-
</div>
|
199
|
-
<div class="method">
|
200
|
-
<div class="title">
|
201
|
-
<a name="M000138"></a><b>executable_real?</b>()
|
202
|
-
</div>
|
203
|
-
<div class="sourcecode">
|
204
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000138_source')" id="l_M000138_source">show source</a> ]</p>
|
205
|
-
<div id="M000138_source" class="dyn-source">
|
206
|
-
<pre>
|
207
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 25</span>
|
208
|
-
<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>
|
209
|
-
</pre>
|
210
|
-
</div>
|
211
|
-
</div>
|
212
|
-
</div>
|
213
|
-
<div class="method">
|
214
|
-
<div class="title">
|
215
|
-
<a name="M000135"></a><b>intialize</b>(path)
|
216
|
-
</div>
|
217
|
-
<div class="sourcecode">
|
218
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000135_source')" id="l_M000135_source">show source</a> ]</p>
|
219
|
-
<div id="M000135_source" class="dyn-source">
|
220
|
-
<pre>
|
221
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 7</span>
|
222
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">intialize</span>(<span class="ruby-identifier">path</span>)
|
223
|
-
<span class="ruby-keyword kw">super</span>
|
224
|
-
<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>)
|
225
|
-
<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>)
|
226
|
-
<span class="ruby-keyword kw">end</span>
|
227
|
-
</pre>
|
228
|
-
</div>
|
229
|
-
</div>
|
230
|
-
</div>
|
231
|
-
<div class="method">
|
232
|
-
<div class="title">
|
233
|
-
<a name="M000143"></a><b>open</b>(mode, &block)
|
234
|
-
</div>
|
235
|
-
<div class="sourcecode">
|
236
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000143_source')" id="l_M000143_source">show source</a> ]</p>
|
237
|
-
<div id="M000143_source" class="dyn-source">
|
238
|
-
<pre>
|
239
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 43</span>
|
240
|
-
<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>)
|
241
|
-
<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>)
|
242
|
-
<span class="ruby-keyword kw">end</span>
|
243
|
-
</pre>
|
244
|
-
</div>
|
245
|
-
</div>
|
246
|
-
</div>
|
247
|
-
<div class="method">
|
248
|
-
<div class="title">
|
249
|
-
<a name="M000139"></a><b>read</b>()
|
250
|
-
</div>
|
251
|
-
<div class="sourcecode">
|
252
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000139_source')" id="l_M000139_source">show source</a> ]</p>
|
253
|
-
<div id="M000139_source" class="dyn-source">
|
254
|
-
<pre>
|
255
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 31</span>
|
256
|
-
<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>
|
257
|
-
</pre>
|
258
|
-
</div>
|
259
|
-
</div>
|
260
|
-
</div>
|
261
|
-
<div class="method">
|
262
|
-
<div class="title">
|
263
|
-
<a name="M000140"></a><b>readlines</b>()
|
264
|
-
</div>
|
265
|
-
<div class="sourcecode">
|
266
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000140_source')" id="l_M000140_source">show source</a> ]</p>
|
267
|
-
<div id="M000140_source" class="dyn-source">
|
268
|
-
<pre>
|
269
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 33</span>
|
270
|
-
<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>
|
271
|
-
</pre>
|
272
|
-
</div>
|
273
|
-
</div>
|
274
|
-
</div>
|
275
|
-
<div class="method">
|
276
|
-
<div class="title">
|
277
|
-
<a name="M000144"></a><b>truncate</b>(size)
|
278
|
-
</div>
|
279
|
-
<div class="sourcecode">
|
280
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000144_source')" id="l_M000144_source">show source</a> ]</p>
|
281
|
-
<div id="M000144_source" class="dyn-source">
|
282
|
-
<pre>
|
283
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 47</span>
|
284
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">truncate</span>(<span class="ruby-identifier">size</span>)
|
285
|
-
<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>)}
|
286
|
-
<span class="ruby-keyword kw">end</span>
|
287
|
-
</pre>
|
288
|
-
</div>
|
289
|
-
</div>
|
290
|
-
</div>
|
291
|
-
<div class="method">
|
292
|
-
<div class="title">
|
293
|
-
<a name="M000141"></a><b>unlink</b>()
|
294
|
-
</div>
|
295
|
-
<div class="description">
|
296
|
-
<p>
|
297
|
-
TODO: how to handle unkinking (b/c file no longer exists)
|
298
|
-
</p>
|
299
|
-
</div>
|
300
|
-
<div class="sourcecode">
|
301
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000141_source')" id="l_M000141_source">show source</a> ]</p>
|
302
|
-
<div id="M000141_source" class="dyn-source">
|
303
|
-
<pre>
|
304
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 36</span>
|
305
|
-
<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>
|
306
|
-
</pre>
|
307
|
-
</div>
|
308
|
-
</div>
|
309
|
-
</div>
|
310
|
-
<div class="method">
|
311
|
-
<div class="title">
|
312
|
-
<a name="M000145"></a><b>write</b>(string)
|
313
|
-
</div>
|
314
|
-
<div class="description">
|
315
|
-
<p>
|
316
|
-
Replace contents of file with string.
|
317
|
-
</p>
|
318
|
-
</div>
|
319
|
-
<div class="aka">
|
320
|
-
This method is also aliased as
|
321
|
-
<a href="Document.html#M000146"><</a>
|
322
|
-
</div>
|
323
|
-
<div class="sourcecode">
|
324
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000145_source')" id="l_M000145_source">show source</a> ]</p>
|
325
|
-
<div id="M000145_source" class="dyn-source">
|
326
|
-
<pre>
|
327
|
-
<span class="ruby-comment cmt"># File lib/folio/document.rb, line 52</span>
|
328
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">string</span>)
|
329
|
-
<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">write</span>(<span class="ruby-identifier">string</span>)}
|
330
|
-
<span class="ruby-keyword kw">end</span>
|
331
|
-
</pre>
|
332
|
-
</div>
|
333
|
-
</div>
|
334
|
-
</div>
|
335
|
-
</div>
|
336
|
-
|
337
|
-
</div>
|
338
|
-
|
339
|
-
</body>
|
340
|
-
</html>
|
@@ -1,92 +0,0 @@
|
|
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>
|
@@ -1,1205 +0,0 @@
|
|
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::FileObject</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::FileObject</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/fileobject_rb.html">lib/folio/fileobject.rb</a>
|
61
|
-
</td>
|
62
|
-
</tr>
|
63
|
-
<tr>
|
64
|
-
<td>Parent:</td>
|
65
|
-
<td>
|
66
|
-
Object
|
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
|
-
<div class="description"><h1>File Object</h1>
|
79
|
-
<p>
|
80
|
-
Base class for all folio objects.
|
81
|
-
</p>
|
82
|
-
</div>
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
<div class="sectiontitle">Methods</div>
|
87
|
-
<ul>
|
88
|
-
<li><a href="#M000133"><=></a></li>
|
89
|
-
<li><a href="#M000134">==</a></li>
|
90
|
-
<li><a href="#M000073">[]</a></li>
|
91
|
-
<li><a href="#M000108">atime</a></li>
|
92
|
-
<li><a href="#M000124">basename</a></li>
|
93
|
-
<li><a href="#M000104">blockdev?</a></li>
|
94
|
-
<li><a href="#M000105">chardev?</a></li>
|
95
|
-
<li><a href="#M000093">chmod</a></li>
|
96
|
-
<li><a href="#M000094">chown</a></li>
|
97
|
-
<li><a href="#M000096">cp</a></li>
|
98
|
-
<li><a href="#M000109">ctime</a></li>
|
99
|
-
<li><a href="#M000088">delete</a></li>
|
100
|
-
<li><a href="#M000091">delete_force</a></li>
|
101
|
-
<li><a href="#M000103">directory?</a></li>
|
102
|
-
<li><a href="#M000125">dirname</a></li>
|
103
|
-
<li><a href="#M000102">document?</a></li>
|
104
|
-
<li><a href="#M000075">exist?</a></li>
|
105
|
-
<li><a href="#M000076">exists?</a></li>
|
106
|
-
<li><a href="#M000126">extname</a></li>
|
107
|
-
<li><a href="#M000129">fnmatch</a></li>
|
108
|
-
<li><a href="#M000130">fnmatch?</a></li>
|
109
|
-
<li><a href="#M000110">grpowned?</a></li>
|
110
|
-
<li><a href="#M000111">identical?</a></li>
|
111
|
-
<li><a href="#M000131">inspect</a></li>
|
112
|
-
<li><a href="#M000097">install</a></li>
|
113
|
-
<li><a href="#M000077">link</a></li>
|
114
|
-
<li><a href="#M000079">link_force</a></li>
|
115
|
-
<li><a href="#M000078">ln</a></li>
|
116
|
-
<li><a href="#M000080">ln_f</a></li>
|
117
|
-
<li><a href="#M000082">ln_s</a></li>
|
118
|
-
<li><a href="#M000084">ln_sf</a></li>
|
119
|
-
<li><a href="#M000112">mtime</a></li>
|
120
|
-
<li><a href="#M000086">mv</a></li>
|
121
|
-
<li><a href="#M000074">new</a></li>
|
122
|
-
<li><a href="#M000113">owned?</a></li>
|
123
|
-
<li><a href="#M000107">pipe?</a></li>
|
124
|
-
<li><a href="#M000114">readable?</a></li>
|
125
|
-
<li><a href="#M000115">readable_real?</a></li>
|
126
|
-
<li><a href="#M000128">relative</a></li>
|
127
|
-
<li><a href="#M000085">rename</a></li>
|
128
|
-
<li><a href="#M000100">restat</a></li>
|
129
|
-
<li><a href="#M000089">rm</a></li>
|
130
|
-
<li><a href="#M000092">rm_f</a></li>
|
131
|
-
<li><a href="#M000116">setgid?</a></li>
|
132
|
-
<li><a href="#M000117">setuid?</a></li>
|
133
|
-
<li><a href="#M000118">size</a></li>
|
134
|
-
<li><a href="#M000119">size?</a></li>
|
135
|
-
<li><a href="#M000106">socket?</a></li>
|
136
|
-
<li><a href="#M000127">split</a></li>
|
137
|
-
<li><a href="#M000099">stat</a></li>
|
138
|
-
<li><a href="#M000101">stat!</a></li>
|
139
|
-
<li><a href="#M000120">sticky?</a></li>
|
140
|
-
<li><a href="#M000081">symlink</a></li>
|
141
|
-
<li><a href="#M000083">symlink_force</a></li>
|
142
|
-
<li><a href="#M000132">to_s</a></li>
|
143
|
-
<li><a href="#M000098">touch</a></li>
|
144
|
-
<li><a href="#M000087">unlink</a></li>
|
145
|
-
<li><a href="#M000090">unlink_force</a></li>
|
146
|
-
<li><a href="#M000095">utime</a></li>
|
147
|
-
<li><a href="#M000121">writable?</a></li>
|
148
|
-
<li><a href="#M000122">writable_real?</a></li>
|
149
|
-
<li><a href="#M000123">zero?</a></li>
|
150
|
-
</ul>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<div class="sectiontitle">Constants</div>
|
156
|
-
<table border='0' cellpadding='5'>
|
157
|
-
<tr valign='top'>
|
158
|
-
<td class="attr-name">Separator</td>
|
159
|
-
<td>=</td>
|
160
|
-
<td class="attr-value">::File::Separator</td>
|
161
|
-
</tr>
|
162
|
-
</table>
|
163
|
-
|
164
|
-
<div class="sectiontitle">Attributes</div>
|
165
|
-
<table border='0' cellpadding='5'>
|
166
|
-
<tr valign='top'>
|
167
|
-
<td class='attr-rw'>
|
168
|
-
[R]
|
169
|
-
</td>
|
170
|
-
<td class='attr-name'>path</td>
|
171
|
-
<td class='attr-desc'></td>
|
172
|
-
</tr>
|
173
|
-
<tr valign='top'>
|
174
|
-
<td class='attr-rw'>
|
175
|
-
[R]
|
176
|
-
</td>
|
177
|
-
<td class='attr-name'>relpath</td>
|
178
|
-
<td class='attr-desc'></td>
|
179
|
-
</tr>
|
180
|
-
</table>
|
181
|
-
|
182
|
-
<div class="sectiontitle">Public Class methods</div>
|
183
|
-
<div class="method">
|
184
|
-
<div class="title">
|
185
|
-
<a name="M000073"></a><b>[]</b>(*path)
|
186
|
-
</div>
|
187
|
-
<div class="description">
|
188
|
-
<p>
|
189
|
-
Factory method.
|
190
|
-
</p>
|
191
|
-
</div>
|
192
|
-
<div class="sourcecode">
|
193
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show source</a> ]</p>
|
194
|
-
<div id="M000073_source" class="dyn-source">
|
195
|
-
<pre>
|
196
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 20</span>
|
197
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">path</span>)
|
198
|
-
<span class="ruby-identifier">path</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">path</span>)
|
199
|
-
|
200
|
-
<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">exist?</span>(<span class="ruby-identifier">path</span>)
|
201
|
-
|
202
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">ftype</span>(<span class="ruby-identifier">path</span>)
|
203
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'file'</span>
|
204
|
-
<span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>)
|
205
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'directory'</span>
|
206
|
-
<span class="ruby-constant">Directory</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>)
|
207
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'link'</span>
|
208
|
-
<span class="ruby-constant">Link</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>)
|
209
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'characterSpecial'</span>
|
210
|
-
<span class="ruby-constant">CharacterDevice</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>)
|
211
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'blockSpecial'</span>
|
212
|
-
<span class="ruby-constant">BlockDevice</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>)
|
213
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'socket'</span>
|
214
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span> <span class="ruby-comment cmt"># Socket.new(path) ?</span>
|
215
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'fifo'</span>
|
216
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span> <span class="ruby-comment cmt"># Pipe?</span>
|
217
|
-
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># 'unknown'</span>
|
218
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>
|
219
|
-
<span class="ruby-keyword kw">end</span>
|
220
|
-
<span class="ruby-keyword kw">end</span>
|
221
|
-
</pre>
|
222
|
-
</div>
|
223
|
-
</div>
|
224
|
-
</div>
|
225
|
-
<div class="method">
|
226
|
-
<div class="title">
|
227
|
-
<a name="M000074"></a><b>new</b>(path)
|
228
|
-
</div>
|
229
|
-
<div class="sourcecode">
|
230
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000074_source')" id="l_M000074_source">show source</a> ]</p>
|
231
|
-
<div id="M000074_source" class="dyn-source">
|
232
|
-
<pre>
|
233
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 47</span>
|
234
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>)
|
235
|
-
<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">exist?</span>(<span class="ruby-identifier">path</span>)
|
236
|
-
<span class="ruby-ivar">@relpath</span> = <span class="ruby-identifier">path</span>
|
237
|
-
<span class="ruby-ivar">@path</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">path</span>)
|
238
|
-
<span class="ruby-keyword kw">end</span>
|
239
|
-
</pre>
|
240
|
-
</div>
|
241
|
-
</div>
|
242
|
-
</div>
|
243
|
-
<div class="sectiontitle">Public Instance methods</div>
|
244
|
-
<div class="method">
|
245
|
-
<div class="title">
|
246
|
-
<a name="M000133"></a><b><=></b>(other)
|
247
|
-
</div>
|
248
|
-
<div class="sourcecode">
|
249
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000133_source')" id="l_M000133_source">show source</a> ]</p>
|
250
|
-
<div id="M000133_source" class="dyn-source">
|
251
|
-
<pre>
|
252
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 233</span>
|
253
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">other</span>)
|
254
|
-
<span class="ruby-identifier">path</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_s</span>
|
255
|
-
<span class="ruby-keyword kw">end</span>
|
256
|
-
</pre>
|
257
|
-
</div>
|
258
|
-
</div>
|
259
|
-
</div>
|
260
|
-
<div class="method">
|
261
|
-
<div class="title">
|
262
|
-
<a name="M000134"></a><b>==</b>(other)
|
263
|
-
</div>
|
264
|
-
<div class="sourcecode">
|
265
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000134_source')" id="l_M000134_source">show source</a> ]</p>
|
266
|
-
<div id="M000134_source" class="dyn-source">
|
267
|
-
<pre>
|
268
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 237</span>
|
269
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
270
|
-
<span class="ruby-identifier">path</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">path</span>
|
271
|
-
<span class="ruby-keyword kw">end</span>
|
272
|
-
</pre>
|
273
|
-
</div>
|
274
|
-
</div>
|
275
|
-
</div>
|
276
|
-
<div class="method">
|
277
|
-
<div class="title">
|
278
|
-
<a name="M000108"></a><b>atime</b>()
|
279
|
-
</div>
|
280
|
-
<div class="sourcecode">
|
281
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000108_source')" id="l_M000108_source">show source</a> ]</p>
|
282
|
-
<div id="M000108_source" class="dyn-source">
|
283
|
-
<pre>
|
284
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 167</span>
|
285
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atime</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">atime</span> ; <span class="ruby-keyword kw">end</span>
|
286
|
-
</pre>
|
287
|
-
</div>
|
288
|
-
</div>
|
289
|
-
</div>
|
290
|
-
<div class="method">
|
291
|
-
<div class="title">
|
292
|
-
<a name="M000124"></a><b>basename</b>()
|
293
|
-
</div>
|
294
|
-
<div class="sourcecode">
|
295
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">show source</a> ]</p>
|
296
|
-
<div id="M000124_source" class="dyn-source">
|
297
|
-
<pre>
|
298
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 188</span>
|
299
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">basename</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
300
|
-
</pre>
|
301
|
-
</div>
|
302
|
-
</div>
|
303
|
-
</div>
|
304
|
-
<div class="method">
|
305
|
-
<div class="title">
|
306
|
-
<a name="M000104"></a><b>blockdev?</b>()
|
307
|
-
</div>
|
308
|
-
<div class="sourcecode">
|
309
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">show source</a> ]</p>
|
310
|
-
<div id="M000104_source" class="dyn-source">
|
311
|
-
<pre>
|
312
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 162</span>
|
313
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blockdev?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">blockdev?</span> ; <span class="ruby-keyword kw">end</span>
|
314
|
-
</pre>
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
</div>
|
318
|
-
<div class="method">
|
319
|
-
<div class="title">
|
320
|
-
<a name="M000105"></a><b>chardev?</b>()
|
321
|
-
</div>
|
322
|
-
<div class="sourcecode">
|
323
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show source</a> ]</p>
|
324
|
-
<div id="M000105_source" class="dyn-source">
|
325
|
-
<pre>
|
326
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 163</span>
|
327
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chardev?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">chardev?</span> ; <span class="ruby-keyword kw">end</span>
|
328
|
-
</pre>
|
329
|
-
</div>
|
330
|
-
</div>
|
331
|
-
</div>
|
332
|
-
<div class="method">
|
333
|
-
<div class="title">
|
334
|
-
<a name="M000093"></a><b>chmod</b>(mode)
|
335
|
-
</div>
|
336
|
-
<div class="sourcecode">
|
337
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show source</a> ]</p>
|
338
|
-
<div id="M000093_source" class="dyn-source">
|
339
|
-
<pre>
|
340
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 112</span>
|
341
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chmod</span>(<span class="ruby-identifier">mode</span>)
|
342
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span>(<span class="ruby-identifier">mode</span>, <span class="ruby-identifier">path</span>)
|
343
|
-
<span class="ruby-keyword kw">end</span>
|
344
|
-
</pre>
|
345
|
-
</div>
|
346
|
-
</div>
|
347
|
-
</div>
|
348
|
-
<div class="method">
|
349
|
-
<div class="title">
|
350
|
-
<a name="M000094"></a><b>chown</b>(user, group)
|
351
|
-
</div>
|
352
|
-
<div class="sourcecode">
|
353
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">show source</a> ]</p>
|
354
|
-
<div id="M000094_source" class="dyn-source">
|
355
|
-
<pre>
|
356
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 116</span>
|
357
|
-
<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>)
|
358
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">chown</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>, <span class="ruby-identifier">path</span>)
|
359
|
-
<span class="ruby-keyword kw">end</span>
|
360
|
-
</pre>
|
361
|
-
</div>
|
362
|
-
</div>
|
363
|
-
</div>
|
364
|
-
<div class="method">
|
365
|
-
<div class="title">
|
366
|
-
<a name="M000096"></a><b>cp</b>(dest)
|
367
|
-
</div>
|
368
|
-
<div class="description">
|
369
|
-
<p>
|
370
|
-
Copy file to destination path.
|
371
|
-
</p>
|
372
|
-
</div>
|
373
|
-
<div class="sourcecode">
|
374
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">show source</a> ]</p>
|
375
|
-
<div id="M000096_source" class="dyn-source">
|
376
|
-
<pre>
|
377
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 131</span>
|
378
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp</span>(<span class="ruby-identifier">dest</span>)
|
379
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">cp</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">dest</span>)
|
380
|
-
<span class="ruby-keyword kw">end</span>
|
381
|
-
</pre>
|
382
|
-
</div>
|
383
|
-
</div>
|
384
|
-
</div>
|
385
|
-
<div class="method">
|
386
|
-
<div class="title">
|
387
|
-
<a name="M000109"></a><b>ctime</b>()
|
388
|
-
</div>
|
389
|
-
<div class="sourcecode">
|
390
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000109_source')" id="l_M000109_source">show source</a> ]</p>
|
391
|
-
<div id="M000109_source" class="dyn-source">
|
392
|
-
<pre>
|
393
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 168</span>
|
394
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ctime</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">ctime</span> ; <span class="ruby-keyword kw">end</span>
|
395
|
-
</pre>
|
396
|
-
</div>
|
397
|
-
</div>
|
398
|
-
</div>
|
399
|
-
<div class="method">
|
400
|
-
<div class="title">
|
401
|
-
<a name="M000088"></a><b>delete</b>()
|
402
|
-
</div>
|
403
|
-
<div class="description">
|
404
|
-
<p>
|
405
|
-
Alias for <a href="FileObject.html#M000087">unlink</a>
|
406
|
-
</p>
|
407
|
-
</div>
|
408
|
-
</div>
|
409
|
-
<div class="method">
|
410
|
-
<div class="title">
|
411
|
-
<a name="M000091"></a><b>delete_force</b>()
|
412
|
-
</div>
|
413
|
-
<div class="description">
|
414
|
-
<p>
|
415
|
-
Alias for <a href="FileObject.html#M000090">unlink_force</a>
|
416
|
-
</p>
|
417
|
-
</div>
|
418
|
-
</div>
|
419
|
-
<div class="method">
|
420
|
-
<div class="title">
|
421
|
-
<a name="M000103"></a><b>directory?</b>()
|
422
|
-
</div>
|
423
|
-
<div class="sourcecode">
|
424
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">show source</a> ]</p>
|
425
|
-
<div id="M000103_source" class="dyn-source">
|
426
|
-
<pre>
|
427
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 161</span>
|
428
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directory?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">directory?</span> ; <span class="ruby-keyword kw">end</span>
|
429
|
-
</pre>
|
430
|
-
</div>
|
431
|
-
</div>
|
432
|
-
</div>
|
433
|
-
<div class="method">
|
434
|
-
<div class="title">
|
435
|
-
<a name="M000125"></a><b>dirname</b>()
|
436
|
-
</div>
|
437
|
-
<div class="sourcecode">
|
438
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">show source</a> ]</p>
|
439
|
-
<div id="M000125_source" class="dyn-source">
|
440
|
-
<pre>
|
441
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 189</span>
|
442
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirname</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
443
|
-
</pre>
|
444
|
-
</div>
|
445
|
-
</div>
|
446
|
-
</div>
|
447
|
-
<div class="method">
|
448
|
-
<div class="title">
|
449
|
-
<a name="M000102"></a><b>document?</b>()
|
450
|
-
</div>
|
451
|
-
<div class="description">
|
452
|
-
<p>
|
453
|
-
def file? ; stat.file? ; end
|
454
|
-
</p>
|
455
|
-
</div>
|
456
|
-
<div class="sourcecode">
|
457
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000102_source')" id="l_M000102_source">show source</a> ]</p>
|
458
|
-
<div id="M000102_source" class="dyn-source">
|
459
|
-
<pre>
|
460
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 160</span>
|
461
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">document?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">file?</span> ; <span class="ruby-keyword kw">end</span>
|
462
|
-
</pre>
|
463
|
-
</div>
|
464
|
-
</div>
|
465
|
-
</div>
|
466
|
-
<div class="method">
|
467
|
-
<div class="title">
|
468
|
-
<a name="M000075"></a><b>exist?</b>()
|
469
|
-
</div>
|
470
|
-
<div class="description">
|
471
|
-
<p>
|
472
|
-
This will alwasy be true, EXCEPT when <a
|
473
|
-
href="FileObject.html#M000089">rm</a>, <a
|
474
|
-
href="FileObject.html#M000088">delete</a> or <a
|
475
|
-
href="FileObject.html#M000087">unlink</a> have been used.
|
476
|
-
</p>
|
477
|
-
</div>
|
478
|
-
<div class="aka">
|
479
|
-
This method is also aliased as
|
480
|
-
<a href="FileObject.html#M000076">exists?</a>
|
481
|
-
</div>
|
482
|
-
<div class="sourcecode">
|
483
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000075_source')" id="l_M000075_source">show source</a> ]</p>
|
484
|
-
<div id="M000075_source" class="dyn-source">
|
485
|
-
<pre>
|
486
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 60</span>
|
487
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exist?</span>
|
488
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
|
489
|
-
<span class="ruby-keyword kw">end</span>
|
490
|
-
</pre>
|
491
|
-
</div>
|
492
|
-
</div>
|
493
|
-
</div>
|
494
|
-
<div class="method">
|
495
|
-
<div class="title">
|
496
|
-
<a name="M000076"></a><b>exists?</b>()
|
497
|
-
</div>
|
498
|
-
<div class="description">
|
499
|
-
<p>
|
500
|
-
Alias for exist?
|
501
|
-
</p>
|
502
|
-
</div>
|
503
|
-
</div>
|
504
|
-
<div class="method">
|
505
|
-
<div class="title">
|
506
|
-
<a name="M000126"></a><b>extname</b>()
|
507
|
-
</div>
|
508
|
-
<div class="sourcecode">
|
509
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000126_source')" id="l_M000126_source">show source</a> ]</p>
|
510
|
-
<div id="M000126_source" class="dyn-source">
|
511
|
-
<pre>
|
512
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 190</span>
|
513
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extname</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
514
|
-
</pre>
|
515
|
-
</div>
|
516
|
-
</div>
|
517
|
-
</div>
|
518
|
-
<div class="method">
|
519
|
-
<div class="title">
|
520
|
-
<a name="M000129"></a><b>fnmatch</b>(pattern, flags=0)
|
521
|
-
</div>
|
522
|
-
<div class="aka">
|
523
|
-
This method is also aliased as
|
524
|
-
<a href="FileObject.html#M000130">fnmatch?</a>
|
525
|
-
</div>
|
526
|
-
<div class="sourcecode">
|
527
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000129_source')" id="l_M000129_source">show source</a> ]</p>
|
528
|
-
<div id="M000129_source" class="dyn-source">
|
529
|
-
<pre>
|
530
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 217</span>
|
531
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fnmatch</span>(<span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">flags</span>=<span class="ruby-value">0</span>)
|
532
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">fnmatch</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">flags</span>)
|
533
|
-
<span class="ruby-keyword kw">end</span>
|
534
|
-
</pre>
|
535
|
-
</div>
|
536
|
-
</div>
|
537
|
-
</div>
|
538
|
-
<div class="method">
|
539
|
-
<div class="title">
|
540
|
-
<a name="M000130"></a><b>fnmatch?</b>(pattern, flags=0)
|
541
|
-
</div>
|
542
|
-
<div class="description">
|
543
|
-
<p>
|
544
|
-
Alias for <a href="FileObject.html#M000129">fnmatch</a>
|
545
|
-
</p>
|
546
|
-
</div>
|
547
|
-
</div>
|
548
|
-
<div class="method">
|
549
|
-
<div class="title">
|
550
|
-
<a name="M000110"></a><b>grpowned?</b>()
|
551
|
-
</div>
|
552
|
-
<div class="sourcecode">
|
553
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000110_source')" id="l_M000110_source">show source</a> ]</p>
|
554
|
-
<div id="M000110_source" class="dyn-source">
|
555
|
-
<pre>
|
556
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 169</span>
|
557
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">grpowned?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">grpowned?</span> ; <span class="ruby-keyword kw">end</span>
|
558
|
-
</pre>
|
559
|
-
</div>
|
560
|
-
</div>
|
561
|
-
</div>
|
562
|
-
<div class="method">
|
563
|
-
<div class="title">
|
564
|
-
<a name="M000111"></a><b>identical?</b>()
|
565
|
-
</div>
|
566
|
-
<div class="sourcecode">
|
567
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">show source</a> ]</p>
|
568
|
-
<div id="M000111_source" class="dyn-source">
|
569
|
-
<pre>
|
570
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 170</span>
|
571
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">identical?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">identical?</span> ; <span class="ruby-keyword kw">end</span>
|
572
|
-
</pre>
|
573
|
-
</div>
|
574
|
-
</div>
|
575
|
-
</div>
|
576
|
-
<div class="method">
|
577
|
-
<div class="title">
|
578
|
-
<a name="M000131"></a><b>inspect</b>()
|
579
|
-
</div>
|
580
|
-
<div class="description">
|
581
|
-
<p>
|
582
|
-
Inspect returns the path string <a
|
583
|
-
href="FileObject.html#M000128">relative</a> to the current working
|
584
|
-
directory.
|
585
|
-
</p>
|
586
|
-
</div>
|
587
|
-
<div class="sourcecode">
|
588
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000131_source')" id="l_M000131_source">show source</a> ]</p>
|
589
|
-
<div id="M000131_source" class="dyn-source">
|
590
|
-
<pre>
|
591
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 228</span>
|
592
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>; <span class="ruby-node">"#{relative}"</span>; <span class="ruby-keyword kw">end</span>
|
593
|
-
</pre>
|
594
|
-
</div>
|
595
|
-
</div>
|
596
|
-
</div>
|
597
|
-
<div class="method">
|
598
|
-
<div class="title">
|
599
|
-
<a name="M000097"></a><b>install</b>(dest, mode=nil)
|
600
|
-
</div>
|
601
|
-
<div class="description">
|
602
|
-
<p>
|
603
|
-
Install file to destination path.
|
604
|
-
</p>
|
605
|
-
</div>
|
606
|
-
<div class="sourcecode">
|
607
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000097_source')" id="l_M000097_source">show source</a> ]</p>
|
608
|
-
<div id="M000097_source" class="dyn-source">
|
609
|
-
<pre>
|
610
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 136</span>
|
611
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>(<span class="ruby-identifier">dest</span>, <span class="ruby-identifier">mode</span>=<span class="ruby-keyword kw">nil</span>)
|
612
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">install</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">mode</span>)
|
613
|
-
<span class="ruby-keyword kw">end</span>
|
614
|
-
</pre>
|
615
|
-
</div>
|
616
|
-
</div>
|
617
|
-
</div>
|
618
|
-
<div class="method">
|
619
|
-
<div class="title">
|
620
|
-
<a name="M000077"></a><b>link</b>(new)
|
621
|
-
</div>
|
622
|
-
<div class="aka">
|
623
|
-
This method is also aliased as
|
624
|
-
<a href="FileObject.html#M000078">ln</a>
|
625
|
-
</div>
|
626
|
-
<div class="sourcecode">
|
627
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">show source</a> ]</p>
|
628
|
-
<div id="M000077_source" class="dyn-source">
|
629
|
-
<pre>
|
630
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 69</span>
|
631
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link</span>(<span class="ruby-identifier">new</span>)
|
632
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">ln</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">new</span>)
|
633
|
-
<span class="ruby-keyword kw">end</span>
|
634
|
-
</pre>
|
635
|
-
</div>
|
636
|
-
</div>
|
637
|
-
</div>
|
638
|
-
<div class="method">
|
639
|
-
<div class="title">
|
640
|
-
<a name="M000079"></a><b>link_force</b>(new)
|
641
|
-
</div>
|
642
|
-
<div class="aka">
|
643
|
-
This method is also aliased as
|
644
|
-
<a href="FileObject.html#M000080">ln_f</a>
|
645
|
-
</div>
|
646
|
-
<div class="sourcecode">
|
647
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000079_source')" id="l_M000079_source">show source</a> ]</p>
|
648
|
-
<div id="M000079_source" class="dyn-source">
|
649
|
-
<pre>
|
650
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 74</span>
|
651
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link_force</span>(<span class="ruby-identifier">new</span>)
|
652
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">new</span>)
|
653
|
-
<span class="ruby-identifier">link</span>(<span class="ruby-identifier">new</span>)
|
654
|
-
<span class="ruby-keyword kw">end</span>
|
655
|
-
</pre>
|
656
|
-
</div>
|
657
|
-
</div>
|
658
|
-
</div>
|
659
|
-
<div class="method">
|
660
|
-
<div class="title">
|
661
|
-
<a name="M000078"></a><b>ln</b>(new)
|
662
|
-
</div>
|
663
|
-
<div class="description">
|
664
|
-
<p>
|
665
|
-
Alias for <a href="FileObject.html#M000077">link</a>
|
666
|
-
</p>
|
667
|
-
</div>
|
668
|
-
</div>
|
669
|
-
<div class="method">
|
670
|
-
<div class="title">
|
671
|
-
<a name="M000080"></a><b>ln_f</b>(new)
|
672
|
-
</div>
|
673
|
-
<div class="description">
|
674
|
-
<p>
|
675
|
-
Alias for <a href="FileObject.html#M000079">link_force</a>
|
676
|
-
</p>
|
677
|
-
</div>
|
678
|
-
</div>
|
679
|
-
<div class="method">
|
680
|
-
<div class="title">
|
681
|
-
<a name="M000082"></a><b>ln_s</b>(new)
|
682
|
-
</div>
|
683
|
-
<div class="description">
|
684
|
-
<p>
|
685
|
-
Alias for <a href="FileObject.html#M000081">symlink</a>
|
686
|
-
</p>
|
687
|
-
</div>
|
688
|
-
</div>
|
689
|
-
<div class="method">
|
690
|
-
<div class="title">
|
691
|
-
<a name="M000084"></a><b>ln_sf</b>(new)
|
692
|
-
</div>
|
693
|
-
<div class="description">
|
694
|
-
<p>
|
695
|
-
Alias for <a href="FileObject.html#M000083">symlink_force</a>
|
696
|
-
</p>
|
697
|
-
</div>
|
698
|
-
</div>
|
699
|
-
<div class="method">
|
700
|
-
<div class="title">
|
701
|
-
<a name="M000112"></a><b>mtime</b>()
|
702
|
-
</div>
|
703
|
-
<div class="sourcecode">
|
704
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000112_source')" id="l_M000112_source">show source</a> ]</p>
|
705
|
-
<div id="M000112_source" class="dyn-source">
|
706
|
-
<pre>
|
707
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 171</span>
|
708
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mtime</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">mtime</span> ; <span class="ruby-keyword kw">end</span>
|
709
|
-
</pre>
|
710
|
-
</div>
|
711
|
-
</div>
|
712
|
-
</div>
|
713
|
-
<div class="method">
|
714
|
-
<div class="title">
|
715
|
-
<a name="M000086"></a><b>mv</b>(dest)
|
716
|
-
</div>
|
717
|
-
<div class="description">
|
718
|
-
<p>
|
719
|
-
Alias for <a href="FileObject.html#M000085">rename</a>
|
720
|
-
</p>
|
721
|
-
</div>
|
722
|
-
</div>
|
723
|
-
<div class="method">
|
724
|
-
<div class="title">
|
725
|
-
<a name="M000113"></a><b>owned?</b>()
|
726
|
-
</div>
|
727
|
-
<div class="sourcecode">
|
728
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">show source</a> ]</p>
|
729
|
-
<div id="M000113_source" class="dyn-source">
|
730
|
-
<pre>
|
731
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 172</span>
|
732
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">owned?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">owned?</span> ; <span class="ruby-keyword kw">end</span>
|
733
|
-
</pre>
|
734
|
-
</div>
|
735
|
-
</div>
|
736
|
-
</div>
|
737
|
-
<div class="method">
|
738
|
-
<div class="title">
|
739
|
-
<a name="M000107"></a><b>pipe?</b>()
|
740
|
-
</div>
|
741
|
-
<div class="sourcecode">
|
742
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000107_source')" id="l_M000107_source">show source</a> ]</p>
|
743
|
-
<div id="M000107_source" class="dyn-source">
|
744
|
-
<pre>
|
745
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 165</span>
|
746
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pipe?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">pipe?</span> ; <span class="ruby-keyword kw">end</span>
|
747
|
-
</pre>
|
748
|
-
</div>
|
749
|
-
</div>
|
750
|
-
</div>
|
751
|
-
<div class="method">
|
752
|
-
<div class="title">
|
753
|
-
<a name="M000114"></a><b>readable?</b>()
|
754
|
-
</div>
|
755
|
-
<div class="sourcecode">
|
756
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">show source</a> ]</p>
|
757
|
-
<div id="M000114_source" class="dyn-source">
|
758
|
-
<pre>
|
759
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 173</span>
|
760
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readable?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">readable?</span> ; <span class="ruby-keyword kw">end</span>
|
761
|
-
</pre>
|
762
|
-
</div>
|
763
|
-
</div>
|
764
|
-
</div>
|
765
|
-
<div class="method">
|
766
|
-
<div class="title">
|
767
|
-
<a name="M000115"></a><b>readable_real?</b>()
|
768
|
-
</div>
|
769
|
-
<div class="sourcecode">
|
770
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show source</a> ]</p>
|
771
|
-
<div id="M000115_source" class="dyn-source">
|
772
|
-
<pre>
|
773
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 174</span>
|
774
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readable_real?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">readable_real</span> ; <span class="ruby-keyword kw">end</span>
|
775
|
-
</pre>
|
776
|
-
</div>
|
777
|
-
</div>
|
778
|
-
</div>
|
779
|
-
<div class="method">
|
780
|
-
<div class="title">
|
781
|
-
<a name="M000128"></a><b>relative</b>()
|
782
|
-
</div>
|
783
|
-
<div class="description">
|
784
|
-
<p>
|
785
|
-
Gives path <a href="FileObject.html#M000128">relative</a> to current
|
786
|
-
working directory. If current is below path one step then it uses
|
787
|
-
’..’, further below and it returns the full path.
|
788
|
-
</p>
|
789
|
-
</div>
|
790
|
-
<div class="sourcecode">
|
791
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000128_source')" id="l_M000128_source">show source</a> ]</p>
|
792
|
-
<div id="M000128_source" class="dyn-source">
|
793
|
-
<pre>
|
794
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 198</span>
|
795
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">relative</span>
|
796
|
-
<span class="ruby-identifier">pwd</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>
|
797
|
-
<span class="ruby-identifier">pth</span> = <span class="ruby-identifier">path</span>
|
798
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pth</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">pwd</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
799
|
-
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">pth</span>[<span class="ruby-identifier">pwd</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">+</span><span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
800
|
-
<span class="ruby-identifier">r</span> = <span class="ruby-value str">'.'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span>
|
801
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">r</span>
|
802
|
-
<span class="ruby-keyword kw">else</span>
|
803
|
-
<span class="ruby-identifier">pwd</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">pwd</span>)
|
804
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pth</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">pwd</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
805
|
-
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">pth</span>[<span class="ruby-identifier">pwd</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">+</span><span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
806
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-value str">'..'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span>
|
807
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'..'</span>, <span class="ruby-identifier">r</span>)
|
808
|
-
<span class="ruby-keyword kw">else</span>
|
809
|
-
<span class="ruby-identifier">pth</span>
|
810
|
-
<span class="ruby-keyword kw">end</span>
|
811
|
-
<span class="ruby-keyword kw">end</span>
|
812
|
-
<span class="ruby-keyword kw">end</span>
|
813
|
-
</pre>
|
814
|
-
</div>
|
815
|
-
</div>
|
816
|
-
</div>
|
817
|
-
<div class="method">
|
818
|
-
<div class="title">
|
819
|
-
<a name="M000085"></a><b>rename</b>(dest)
|
820
|
-
</div>
|
821
|
-
<div class="aka">
|
822
|
-
This method is also aliased as
|
823
|
-
<a href="FileObject.html#M000086">mv</a>
|
824
|
-
</div>
|
825
|
-
<div class="sourcecode">
|
826
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show source</a> ]</p>
|
827
|
-
<div id="M000085_source" class="dyn-source">
|
828
|
-
<pre>
|
829
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 91</span>
|
830
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rename</span>(<span class="ruby-identifier">dest</span>)
|
831
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">rename</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">dest</span>)
|
832
|
-
<span class="ruby-ivar">@relpath</span> = <span class="ruby-identifier">dest</span>
|
833
|
-
<span class="ruby-ivar">@path</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">dest</span>)
|
834
|
-
<span class="ruby-keyword kw">end</span>
|
835
|
-
</pre>
|
836
|
-
</div>
|
837
|
-
</div>
|
838
|
-
</div>
|
839
|
-
<div class="method">
|
840
|
-
<div class="title">
|
841
|
-
<a name="M000100"></a><b>restat</b>()
|
842
|
-
</div>
|
843
|
-
<div class="description">
|
844
|
-
<p>
|
845
|
-
Refresh status cache.
|
846
|
-
</p>
|
847
|
-
</div>
|
848
|
-
<div class="aka">
|
849
|
-
This method is also aliased as
|
850
|
-
<a href="FileObject.html#M000101">stat!</a>
|
851
|
-
</div>
|
852
|
-
<div class="sourcecode">
|
853
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000100_source')" id="l_M000100_source">show source</a> ]</p>
|
854
|
-
<div id="M000100_source" class="dyn-source">
|
855
|
-
<pre>
|
856
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 154</span>
|
857
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restat</span>
|
858
|
-
<span class="ruby-ivar">@stat</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">path</span>)
|
859
|
-
<span class="ruby-keyword kw">end</span>
|
860
|
-
</pre>
|
861
|
-
</div>
|
862
|
-
</div>
|
863
|
-
</div>
|
864
|
-
<div class="method">
|
865
|
-
<div class="title">
|
866
|
-
<a name="M000089"></a><b>rm</b>()
|
867
|
-
</div>
|
868
|
-
<div class="description">
|
869
|
-
<p>
|
870
|
-
Alias for <a href="FileObject.html#M000087">unlink</a>
|
871
|
-
</p>
|
872
|
-
</div>
|
873
|
-
</div>
|
874
|
-
<div class="method">
|
875
|
-
<div class="title">
|
876
|
-
<a name="M000092"></a><b>rm_f</b>()
|
877
|
-
</div>
|
878
|
-
<div class="description">
|
879
|
-
<p>
|
880
|
-
Alias for <a href="FileObject.html#M000090">unlink_force</a>
|
881
|
-
</p>
|
882
|
-
</div>
|
883
|
-
</div>
|
884
|
-
<div class="method">
|
885
|
-
<div class="title">
|
886
|
-
<a name="M000116"></a><b>setgid?</b>()
|
887
|
-
</div>
|
888
|
-
<div class="sourcecode">
|
889
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">show source</a> ]</p>
|
890
|
-
<div id="M000116_source" class="dyn-source">
|
891
|
-
<pre>
|
892
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 175</span>
|
893
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setgid?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">setgid?</span> ; <span class="ruby-keyword kw">end</span>
|
894
|
-
</pre>
|
895
|
-
</div>
|
896
|
-
</div>
|
897
|
-
</div>
|
898
|
-
<div class="method">
|
899
|
-
<div class="title">
|
900
|
-
<a name="M000117"></a><b>setuid?</b>()
|
901
|
-
</div>
|
902
|
-
<div class="sourcecode">
|
903
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000117_source')" id="l_M000117_source">show source</a> ]</p>
|
904
|
-
<div id="M000117_source" class="dyn-source">
|
905
|
-
<pre>
|
906
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 176</span>
|
907
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setuid?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">setuid?</span> ; <span class="ruby-keyword kw">end</span>
|
908
|
-
</pre>
|
909
|
-
</div>
|
910
|
-
</div>
|
911
|
-
</div>
|
912
|
-
<div class="method">
|
913
|
-
<div class="title">
|
914
|
-
<a name="M000118"></a><b>size</b>()
|
915
|
-
</div>
|
916
|
-
<div class="sourcecode">
|
917
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">show source</a> ]</p>
|
918
|
-
<div id="M000118_source" class="dyn-source">
|
919
|
-
<pre>
|
920
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 177</span>
|
921
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">size</span> ; <span class="ruby-keyword kw">end</span>
|
922
|
-
</pre>
|
923
|
-
</div>
|
924
|
-
</div>
|
925
|
-
</div>
|
926
|
-
<div class="method">
|
927
|
-
<div class="title">
|
928
|
-
<a name="M000119"></a><b>size?</b>()
|
929
|
-
</div>
|
930
|
-
<div class="sourcecode">
|
931
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show source</a> ]</p>
|
932
|
-
<div id="M000119_source" class="dyn-source">
|
933
|
-
<pre>
|
934
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 178</span>
|
935
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">size?</span> ; <span class="ruby-keyword kw">end</span>
|
936
|
-
</pre>
|
937
|
-
</div>
|
938
|
-
</div>
|
939
|
-
</div>
|
940
|
-
<div class="method">
|
941
|
-
<div class="title">
|
942
|
-
<a name="M000106"></a><b>socket?</b>()
|
943
|
-
</div>
|
944
|
-
<div class="sourcecode">
|
945
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show source</a> ]</p>
|
946
|
-
<div id="M000106_source" class="dyn-source">
|
947
|
-
<pre>
|
948
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 164</span>
|
949
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">socket?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">socket?</span> ; <span class="ruby-keyword kw">end</span>
|
950
|
-
</pre>
|
951
|
-
</div>
|
952
|
-
</div>
|
953
|
-
</div>
|
954
|
-
<div class="method">
|
955
|
-
<div class="title">
|
956
|
-
<a name="M000127"></a><b>split</b>()
|
957
|
-
</div>
|
958
|
-
<div class="description">
|
959
|
-
<p>
|
960
|
-
TODO: I don‘t like the name of this.
|
961
|
-
</p>
|
962
|
-
</div>
|
963
|
-
<div class="sourcecode">
|
964
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000127_source')" id="l_M000127_source">show source</a> ]</p>
|
965
|
-
<div id="M000127_source" class="dyn-source">
|
966
|
-
<pre>
|
967
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 193</span>
|
968
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">split</span> ; <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">path</span>) ; <span class="ruby-keyword kw">end</span>
|
969
|
-
</pre>
|
970
|
-
</div>
|
971
|
-
</div>
|
972
|
-
</div>
|
973
|
-
<div class="method">
|
974
|
-
<div class="title">
|
975
|
-
<a name="M000099"></a><b>stat</b>()
|
976
|
-
</div>
|
977
|
-
<div class="description">
|
978
|
-
<p>
|
979
|
-
Get <a href="FileObject.html#M000099">stat</a> and cache it.
|
980
|
-
</p>
|
981
|
-
</div>
|
982
|
-
<div class="sourcecode">
|
983
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000099_source')" id="l_M000099_source">show source</a> ]</p>
|
984
|
-
<div id="M000099_source" class="dyn-source">
|
985
|
-
<pre>
|
986
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 149</span>
|
987
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stat</span>
|
988
|
-
<span class="ruby-ivar">@stat</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">path</span>)
|
989
|
-
<span class="ruby-keyword kw">end</span>
|
990
|
-
</pre>
|
991
|
-
</div>
|
992
|
-
</div>
|
993
|
-
</div>
|
994
|
-
<div class="method">
|
995
|
-
<div class="title">
|
996
|
-
<a name="M000101"></a><b>stat!</b>()
|
997
|
-
</div>
|
998
|
-
<div class="description">
|
999
|
-
<p>
|
1000
|
-
Alias for <a href="FileObject.html#M000100">restat</a>
|
1001
|
-
</p>
|
1002
|
-
</div>
|
1003
|
-
</div>
|
1004
|
-
<div class="method">
|
1005
|
-
<div class="title">
|
1006
|
-
<a name="M000120"></a><b>sticky?</b>()
|
1007
|
-
</div>
|
1008
|
-
<div class="sourcecode">
|
1009
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show source</a> ]</p>
|
1010
|
-
<div id="M000120_source" class="dyn-source">
|
1011
|
-
<pre>
|
1012
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 179</span>
|
1013
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sticky?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">sticky?</span> ; <span class="ruby-keyword kw">end</span>
|
1014
|
-
</pre>
|
1015
|
-
</div>
|
1016
|
-
</div>
|
1017
|
-
</div>
|
1018
|
-
<div class="method">
|
1019
|
-
<div class="title">
|
1020
|
-
<a name="M000081"></a><b>symlink</b>(new)
|
1021
|
-
</div>
|
1022
|
-
<div class="aka">
|
1023
|
-
This method is also aliased as
|
1024
|
-
<a href="FileObject.html#M000082">ln_s</a>
|
1025
|
-
</div>
|
1026
|
-
<div class="sourcecode">
|
1027
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000081_source')" id="l_M000081_source">show source</a> ]</p>
|
1028
|
-
<div id="M000081_source" class="dyn-source">
|
1029
|
-
<pre>
|
1030
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 80</span>
|
1031
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symlink</span>(<span class="ruby-identifier">new</span>)
|
1032
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">new</span>)
|
1033
|
-
<span class="ruby-keyword kw">end</span>
|
1034
|
-
</pre>
|
1035
|
-
</div>
|
1036
|
-
</div>
|
1037
|
-
</div>
|
1038
|
-
<div class="method">
|
1039
|
-
<div class="title">
|
1040
|
-
<a name="M000083"></a><b>symlink_force</b>(new)
|
1041
|
-
</div>
|
1042
|
-
<div class="aka">
|
1043
|
-
This method is also aliased as
|
1044
|
-
<a href="FileObject.html#M000084">ln_sf</a>
|
1045
|
-
</div>
|
1046
|
-
<div class="sourcecode">
|
1047
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000083_source')" id="l_M000083_source">show source</a> ]</p>
|
1048
|
-
<div id="M000083_source" class="dyn-source">
|
1049
|
-
<pre>
|
1050
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 85</span>
|
1051
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symlink_force</span>(<span class="ruby-identifier">new</span>)
|
1052
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">new</span>)
|
1053
|
-
<span class="ruby-identifier">symlink</span>(<span class="ruby-identifier">new</span>)
|
1054
|
-
<span class="ruby-keyword kw">end</span>
|
1055
|
-
</pre>
|
1056
|
-
</div>
|
1057
|
-
</div>
|
1058
|
-
</div>
|
1059
|
-
<div class="method">
|
1060
|
-
<div class="title">
|
1061
|
-
<a name="M000132"></a><b>to_s</b>()
|
1062
|
-
</div>
|
1063
|
-
<div class="description">
|
1064
|
-
<p>
|
1065
|
-
Returns the path string.
|
1066
|
-
</p>
|
1067
|
-
</div>
|
1068
|
-
<div class="sourcecode">
|
1069
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000132_source')" id="l_M000132_source">show source</a> ]</p>
|
1070
|
-
<div id="M000132_source" class="dyn-source">
|
1071
|
-
<pre>
|
1072
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 231</span>
|
1073
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span> ; <span class="ruby-identifier">path</span> ; <span class="ruby-keyword kw">end</span>
|
1074
|
-
</pre>
|
1075
|
-
</div>
|
1076
|
-
</div>
|
1077
|
-
</div>
|
1078
|
-
<div class="method">
|
1079
|
-
<div class="title">
|
1080
|
-
<a name="M000098"></a><b>touch</b>()
|
1081
|
-
</div>
|
1082
|
-
<div class="sourcecode">
|
1083
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">show source</a> ]</p>
|
1084
|
-
<div id="M000098_source" class="dyn-source">
|
1085
|
-
<pre>
|
1086
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 140</span>
|
1087
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">touch</span>
|
1088
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">touch</span>(<span class="ruby-identifier">path</span>)
|
1089
|
-
<span class="ruby-keyword kw">end</span>
|
1090
|
-
</pre>
|
1091
|
-
</div>
|
1092
|
-
</div>
|
1093
|
-
</div>
|
1094
|
-
<div class="method">
|
1095
|
-
<div class="title">
|
1096
|
-
<a name="M000087"></a><b>unlink</b>()
|
1097
|
-
</div>
|
1098
|
-
<div class="description">
|
1099
|
-
<p>
|
1100
|
-
how to handle —b/c it disappears?
|
1101
|
-
</p>
|
1102
|
-
</div>
|
1103
|
-
<div class="aka">
|
1104
|
-
This method is also aliased as
|
1105
|
-
<a href="FileObject.html#M000088">delete</a>
|
1106
|
-
<a href="FileObject.html#M000089">rm</a>
|
1107
|
-
</div>
|
1108
|
-
<div class="sourcecode">
|
1109
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">show source</a> ]</p>
|
1110
|
-
<div id="M000087_source" class="dyn-source">
|
1111
|
-
<pre>
|
1112
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 99</span>
|
1113
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlink</span>
|
1114
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
|
1115
|
-
<span class="ruby-keyword kw">end</span>
|
1116
|
-
</pre>
|
1117
|
-
</div>
|
1118
|
-
</div>
|
1119
|
-
</div>
|
1120
|
-
<div class="method">
|
1121
|
-
<div class="title">
|
1122
|
-
<a name="M000090"></a><b>unlink_force</b>()
|
1123
|
-
</div>
|
1124
|
-
<div class="aka">
|
1125
|
-
This method is also aliased as
|
1126
|
-
<a href="FileObject.html#M000091">delete_force</a>
|
1127
|
-
<a href="FileObject.html#M000092">rm_f</a>
|
1128
|
-
</div>
|
1129
|
-
<div class="sourcecode">
|
1130
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">show source</a> ]</p>
|
1131
|
-
<div id="M000090_source" class="dyn-source">
|
1132
|
-
<pre>
|
1133
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 105</span>
|
1134
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlink_force</span>
|
1135
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">new</span>)
|
1136
|
-
<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">path</span>)
|
1137
|
-
<span class="ruby-keyword kw">end</span>
|
1138
|
-
</pre>
|
1139
|
-
</div>
|
1140
|
-
</div>
|
1141
|
-
</div>
|
1142
|
-
<div class="method">
|
1143
|
-
<div class="title">
|
1144
|
-
<a name="M000095"></a><b>utime</b>(atime, mtime)
|
1145
|
-
</div>
|
1146
|
-
<div class="sourcecode">
|
1147
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">show source</a> ]</p>
|
1148
|
-
<div id="M000095_source" class="dyn-source">
|
1149
|
-
<pre>
|
1150
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 120</span>
|
1151
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">utime</span>(<span class="ruby-identifier">atime</span>, <span class="ruby-identifier">mtime</span>)
|
1152
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">utime</span>(<span class="ruby-identifier">atime</span>, <span class="ruby-identifier">mtime</span>, <span class="ruby-identifier">path</span>)
|
1153
|
-
<span class="ruby-keyword kw">end</span>
|
1154
|
-
</pre>
|
1155
|
-
</div>
|
1156
|
-
</div>
|
1157
|
-
</div>
|
1158
|
-
<div class="method">
|
1159
|
-
<div class="title">
|
1160
|
-
<a name="M000121"></a><b>writable?</b>()
|
1161
|
-
</div>
|
1162
|
-
<div class="sourcecode">
|
1163
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show source</a> ]</p>
|
1164
|
-
<div id="M000121_source" class="dyn-source">
|
1165
|
-
<pre>
|
1166
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 180</span>
|
1167
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">writable?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">writable?</span> ; <span class="ruby-keyword kw">end</span>
|
1168
|
-
</pre>
|
1169
|
-
</div>
|
1170
|
-
</div>
|
1171
|
-
</div>
|
1172
|
-
<div class="method">
|
1173
|
-
<div class="title">
|
1174
|
-
<a name="M000122"></a><b>writable_real?</b>()
|
1175
|
-
</div>
|
1176
|
-
<div class="sourcecode">
|
1177
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show source</a> ]</p>
|
1178
|
-
<div id="M000122_source" class="dyn-source">
|
1179
|
-
<pre>
|
1180
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 181</span>
|
1181
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">writable_real?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">writable_real?</span> ; <span class="ruby-keyword kw">end</span>
|
1182
|
-
</pre>
|
1183
|
-
</div>
|
1184
|
-
</div>
|
1185
|
-
</div>
|
1186
|
-
<div class="method">
|
1187
|
-
<div class="title">
|
1188
|
-
<a name="M000123"></a><b>zero?</b>()
|
1189
|
-
</div>
|
1190
|
-
<div class="sourcecode">
|
1191
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">show source</a> ]</p>
|
1192
|
-
<div id="M000123_source" class="dyn-source">
|
1193
|
-
<pre>
|
1194
|
-
<span class="ruby-comment cmt"># File lib/folio/fileobject.rb, line 182</span>
|
1195
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zero?</span> ; <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">zero?</span> ; <span class="ruby-keyword kw">end</span>
|
1196
|
-
</pre>
|
1197
|
-
</div>
|
1198
|
-
</div>
|
1199
|
-
</div>
|
1200
|
-
</div>
|
1201
|
-
|
1202
|
-
</div>
|
1203
|
-
|
1204
|
-
</body>
|
1205
|
-
</html>
|