folio 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,117 +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::BlockDevice</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::BlockDevice</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/device_rb.html">lib/folio/device.rb</a>
|
|
61
|
-
</td>
|
|
62
|
-
</tr>
|
|
63
|
-
<tr>
|
|
64
|
-
<td>Parent:</td>
|
|
65
|
-
<td>
|
|
66
|
-
<a href="Device.html">
|
|
67
|
-
Device
|
|
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
|
-
<div class="description"><p>
|
|
81
|
-
Block device
|
|
82
|
-
</p>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<div class="sectiontitle">Methods</div>
|
|
88
|
-
<ul>
|
|
89
|
-
<li><a href="#M000035">blockdev?</a></li>
|
|
90
|
-
</ul>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<div class="sectiontitle">Public Instance methods</div>
|
|
98
|
-
<div class="method">
|
|
99
|
-
<div class="title">
|
|
100
|
-
<a name="M000035"></a><b>blockdev?</b>()
|
|
101
|
-
</div>
|
|
102
|
-
<div class="sourcecode">
|
|
103
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show source</a> ]</p>
|
|
104
|
-
<div id="M000035_source" class="dyn-source">
|
|
105
|
-
<pre>
|
|
106
|
-
<span class="ruby-comment cmt"># File lib/folio/device.rb, line 24</span>
|
|
107
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blockdev?</span> ; <span class="ruby-keyword kw">true</span> ; <span class="ruby-keyword kw">end</span>
|
|
108
|
-
</pre>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
</body>
|
|
117
|
-
</html>
|
|
@@ -1,117 +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::CharacterDevice</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::CharacterDevice</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/device_rb.html">lib/folio/device.rb</a>
|
|
61
|
-
</td>
|
|
62
|
-
</tr>
|
|
63
|
-
<tr>
|
|
64
|
-
<td>Parent:</td>
|
|
65
|
-
<td>
|
|
66
|
-
<a href="Device.html">
|
|
67
|
-
Device
|
|
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
|
-
<div class="description"><p>
|
|
81
|
-
Character device
|
|
82
|
-
</p>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<div class="sectiontitle">Methods</div>
|
|
88
|
-
<ul>
|
|
89
|
-
<li><a href="#M000149">chardev?</a></li>
|
|
90
|
-
</ul>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<div class="sectiontitle">Public Instance methods</div>
|
|
98
|
-
<div class="method">
|
|
99
|
-
<div class="title">
|
|
100
|
-
<a name="M000149"></a><b>chardev?</b>()
|
|
101
|
-
</div>
|
|
102
|
-
<div class="sourcecode">
|
|
103
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000149_source')" id="l_M000149_source">show source</a> ]</p>
|
|
104
|
-
<div id="M000149_source" class="dyn-source">
|
|
105
|
-
<pre>
|
|
106
|
-
<span class="ruby-comment cmt"># File lib/folio/device.rb, line 17</span>
|
|
107
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chardev?</span> ; <span class="ruby-keyword kw">true</span> ; <span class="ruby-keyword kw">end</span>
|
|
108
|
-
</pre>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
</body>
|
|
117
|
-
</html>
|
|
@@ -1,119 +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::Device</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::Device</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/device_rb.html">lib/folio/device.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
|
-
<div class="description"><p>
|
|
81
|
-
<a href="Device.html">Device</a> base class
|
|
82
|
-
</p>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<div class="sectiontitle">Methods</div>
|
|
88
|
-
<ul>
|
|
89
|
-
<li><a href="#M000003">new</a></li>
|
|
90
|
-
</ul>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<div class="sectiontitle">Public Class methods</div>
|
|
98
|
-
<div class="method">
|
|
99
|
-
<div class="title">
|
|
100
|
-
<a name="M000003"></a><b>new</b>(path)
|
|
101
|
-
</div>
|
|
102
|
-
<div class="sourcecode">
|
|
103
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p>
|
|
104
|
-
<div id="M000003_source" class="dyn-source">
|
|
105
|
-
<pre>
|
|
106
|
-
<span class="ruby-comment cmt"># File lib/folio/device.rb, line 8</span>
|
|
107
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>)
|
|
108
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">'Devices not yet supported.'</span>
|
|
109
|
-
<span class="ruby-keyword kw">end</span>
|
|
110
|
-
</pre>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
</body>
|
|
119
|
-
</html>
|
|
@@ -1,548 +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::Directory</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::Directory</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/directory_rb.html">lib/folio/directory.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="#M000034">+</a></li>
|
|
86
|
-
<li><a href="#M000033">/</a></li>
|
|
87
|
-
<li><a href="#M000024">cd</a></li>
|
|
88
|
-
<li><a href="#M000023">chdir</a></li>
|
|
89
|
-
<li><a href="#M000021">chmod_r</a></li>
|
|
90
|
-
<li><a href="#M000022">chown_r</a></li>
|
|
91
|
-
<li><a href="#M000025">chroot</a></li>
|
|
92
|
-
<li><a href="#M000015">cp_r</a></li>
|
|
93
|
-
<li><a href="#M000018">delete</a></li>
|
|
94
|
-
<li><a href="#M000032">directories</a></li>
|
|
95
|
-
<li><a href="#M000014">directory?</a></li>
|
|
96
|
-
<li><a href="#M000029">directory_entries</a></li>
|
|
97
|
-
<li><a href="#M000028">document_entries</a></li>
|
|
98
|
-
<li><a href="#M000031">documents</a></li>
|
|
99
|
-
<li><a href="#M000027">entries</a></li>
|
|
100
|
-
<li><a href="#M000030">files</a></li>
|
|
101
|
-
<li><a href="#M000026">foreach</a></li>
|
|
102
|
-
<li><a href="#M000013">new</a></li>
|
|
103
|
-
<li><a href="#M000019">rm_r</a></li>
|
|
104
|
-
<li><a href="#M000020">rm_rf</a></li>
|
|
105
|
-
<li><a href="#M000016">rmdir</a></li>
|
|
106
|
-
<li><a href="#M000017">unlink</a></li>
|
|
107
|
-
</ul>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<div class="sectiontitle">Public Class methods</div>
|
|
115
|
-
<div class="method">
|
|
116
|
-
<div class="title">
|
|
117
|
-
<a name="M000013"></a><b>new</b>(path=nil)
|
|
118
|
-
</div>
|
|
119
|
-
<div class="sourcecode">
|
|
120
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p>
|
|
121
|
-
<div id="M000013_source" class="dyn-source">
|
|
122
|
-
<pre>
|
|
123
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 7</span>
|
|
124
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>=<span class="ruby-keyword kw">nil</span>)
|
|
125
|
-
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">path</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>)
|
|
126
|
-
<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">directory?</span>(<span class="ruby-ivar">@path</span>)
|
|
127
|
-
<span class="ruby-keyword kw">end</span>
|
|
128
|
-
</pre>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="sectiontitle">Public Instance methods</div>
|
|
133
|
-
<div class="method">
|
|
134
|
-
<div class="title">
|
|
135
|
-
<a name="M000034"></a><b>+</b>(fname)
|
|
136
|
-
</div>
|
|
137
|
-
<div class="description">
|
|
138
|
-
<p>
|
|
139
|
-
Alias for #/
|
|
140
|
-
</p>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
<div class="method">
|
|
144
|
-
<div class="title">
|
|
145
|
-
<a name="M000033"></a><b>/</b>(fname)
|
|
146
|
-
</div>
|
|
147
|
-
<div class="description">
|
|
148
|
-
<p>
|
|
149
|
-
Join path and return <a href="Directory.html#M000013">new</a> file object.
|
|
150
|
-
</p>
|
|
151
|
-
</div>
|
|
152
|
-
<div class="aka">
|
|
153
|
-
This method is also aliased as
|
|
154
|
-
<a href="Directory.html#M000034">+</a>
|
|
155
|
-
</div>
|
|
156
|
-
<div class="sourcecode">
|
|
157
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p>
|
|
158
|
-
<div id="M000033_source" class="dyn-source">
|
|
159
|
-
<pre>
|
|
160
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 118</span>
|
|
161
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">/</span>(<span class="ruby-identifier">fname</span>)
|
|
162
|
-
<span class="ruby-constant">FileObject</span>[<span class="ruby-identifier">path</span>, <span class="ruby-identifier">fname</span>]
|
|
163
|
-
<span class="ruby-keyword kw">end</span>
|
|
164
|
-
</pre>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
<div class="method">
|
|
169
|
-
<div class="title">
|
|
170
|
-
<a name="M000024"></a><b>cd</b>(&block)
|
|
171
|
-
</div>
|
|
172
|
-
<div class="description">
|
|
173
|
-
<p>
|
|
174
|
-
Alias for <a href="Directory.html#M000023">chdir</a>
|
|
175
|
-
</p>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
<div class="method">
|
|
179
|
-
<div class="title">
|
|
180
|
-
<a name="M000023"></a><b>chdir</b>(&block)
|
|
181
|
-
</div>
|
|
182
|
-
<div class="description">
|
|
183
|
-
<p>
|
|
184
|
-
Change into this directory.
|
|
185
|
-
</p>
|
|
186
|
-
</div>
|
|
187
|
-
<div class="aka">
|
|
188
|
-
This method is also aliased as
|
|
189
|
-
<a href="Directory.html#M000024">cd</a>
|
|
190
|
-
</div>
|
|
191
|
-
<div class="sourcecode">
|
|
192
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p>
|
|
193
|
-
<div id="M000023_source" class="dyn-source">
|
|
194
|
-
<pre>
|
|
195
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 69</span>
|
|
196
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chdir</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
197
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">path</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
198
|
-
<span class="ruby-keyword kw">end</span>
|
|
199
|
-
</pre>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
<div class="method">
|
|
204
|
-
<div class="title">
|
|
205
|
-
<a name="M000021"></a><b>chmod_r</b>(mode)
|
|
206
|
-
</div>
|
|
207
|
-
<div class="description">
|
|
208
|
-
<p>
|
|
209
|
-
Change the mode of this directory and all it‘s content recursively.
|
|
210
|
-
</p>
|
|
211
|
-
</div>
|
|
212
|
-
<div class="sourcecode">
|
|
213
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p>
|
|
214
|
-
<div id="M000021_source" class="dyn-source">
|
|
215
|
-
<pre>
|
|
216
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 52</span>
|
|
217
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chmod_r</span>(<span class="ruby-identifier">mode</span>)
|
|
218
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">chmod_r</span>(<span class="ruby-identifier">mode</span>, <span class="ruby-identifier">path</span>)
|
|
219
|
-
<span class="ruby-keyword kw">end</span>
|
|
220
|
-
</pre>
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
<div class="method">
|
|
225
|
-
<div class="title">
|
|
226
|
-
<a name="M000022"></a><b>chown_r</b>(user, group)
|
|
227
|
-
</div>
|
|
228
|
-
<div class="description">
|
|
229
|
-
<p>
|
|
230
|
-
Change the owner of this directory and all it‘s content recursively.
|
|
231
|
-
</p>
|
|
232
|
-
</div>
|
|
233
|
-
<div class="sourcecode">
|
|
234
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p>
|
|
235
|
-
<div id="M000022_source" class="dyn-source">
|
|
236
|
-
<pre>
|
|
237
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 59</span>
|
|
238
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chown_r</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>)
|
|
239
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">chown_r</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>, <span class="ruby-identifier">path</span>)
|
|
240
|
-
<span class="ruby-keyword kw">end</span>
|
|
241
|
-
</pre>
|
|
242
|
-
</div>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
<div class="method">
|
|
246
|
-
<div class="title">
|
|
247
|
-
<a name="M000025"></a><b>chroot</b>(&block)
|
|
248
|
-
</div>
|
|
249
|
-
<div class="description">
|
|
250
|
-
<p>
|
|
251
|
-
Make this directory the file system root.
|
|
252
|
-
</p>
|
|
253
|
-
</div>
|
|
254
|
-
<div class="sourcecode">
|
|
255
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p>
|
|
256
|
-
<div id="M000025_source" class="dyn-source">
|
|
257
|
-
<pre>
|
|
258
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 75</span>
|
|
259
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chroot</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
260
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chroot</span>(<span class="ruby-identifier">path</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
261
|
-
<span class="ruby-keyword kw">end</span>
|
|
262
|
-
</pre>
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
</div>
|
|
266
|
-
<div class="method">
|
|
267
|
-
<div class="title">
|
|
268
|
-
<a name="M000015"></a><b>cp_r</b>(dest)
|
|
269
|
-
</div>
|
|
270
|
-
<div class="description">
|
|
271
|
-
<p>
|
|
272
|
-
Copy this directory recursively to destination.
|
|
273
|
-
</p>
|
|
274
|
-
</div>
|
|
275
|
-
<div class="sourcecode">
|
|
276
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p>
|
|
277
|
-
<div id="M000015_source" class="dyn-source">
|
|
278
|
-
<pre>
|
|
279
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 18</span>
|
|
280
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp_r</span>(<span class="ruby-identifier">dest</span>)
|
|
281
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">cp_r</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">dest</span>)
|
|
282
|
-
<span class="ruby-keyword kw">end</span>
|
|
283
|
-
</pre>
|
|
284
|
-
</div>
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
<div class="method">
|
|
288
|
-
<div class="title">
|
|
289
|
-
<a name="M000018"></a><b>delete</b>()
|
|
290
|
-
</div>
|
|
291
|
-
<div class="description">
|
|
292
|
-
<p>
|
|
293
|
-
Alias for <a href="Directory.html#M000016">rmdir</a>
|
|
294
|
-
</p>
|
|
295
|
-
</div>
|
|
296
|
-
</div>
|
|
297
|
-
<div class="method">
|
|
298
|
-
<div class="title">
|
|
299
|
-
<a name="M000032"></a><b>directories</b>()
|
|
300
|
-
</div>
|
|
301
|
-
<div class="description">
|
|
302
|
-
<p>
|
|
303
|
-
Returns an <a href="../Enumerator.html">Enumerator</a> over all <a
|
|
304
|
-
href="Directory.html#M000032">directories</a> in the directory.
|
|
305
|
-
</p>
|
|
306
|
-
</div>
|
|
307
|
-
<div class="sourcecode">
|
|
308
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p>
|
|
309
|
-
<div id="M000032_source" class="dyn-source">
|
|
310
|
-
<pre>
|
|
311
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 113</span>
|
|
312
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directories</span>
|
|
313
|
-
<span class="ruby-identifier">directory_entries</span>.<span class="ruby-identifier">to_enum</span>(<span class="ruby-identifier">:each</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">FileObject</span>[<span class="ruby-identifier">path</span>, <span class="ruby-identifier">f</span>] }
|
|
314
|
-
<span class="ruby-keyword kw">end</span>
|
|
315
|
-
</pre>
|
|
316
|
-
</div>
|
|
317
|
-
</div>
|
|
318
|
-
</div>
|
|
319
|
-
<div class="method">
|
|
320
|
-
<div class="title">
|
|
321
|
-
<a name="M000014"></a><b>directory?</b>()
|
|
322
|
-
</div>
|
|
323
|
-
<div class="sourcecode">
|
|
324
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p>
|
|
325
|
-
<div id="M000014_source" class="dyn-source">
|
|
326
|
-
<pre>
|
|
327
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 12</span>
|
|
328
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directory?</span> ; <span class="ruby-keyword kw">true</span> ; <span class="ruby-keyword kw">end</span>
|
|
329
|
-
</pre>
|
|
330
|
-
</div>
|
|
331
|
-
</div>
|
|
332
|
-
</div>
|
|
333
|
-
<div class="method">
|
|
334
|
-
<div class="title">
|
|
335
|
-
<a name="M000029"></a><b>directory_entries</b>()
|
|
336
|
-
</div>
|
|
337
|
-
<div class="description">
|
|
338
|
-
<p>
|
|
339
|
-
Returns a list of directory names. This does not include ’.’ or
|
|
340
|
-
’..’.
|
|
341
|
-
</p>
|
|
342
|
-
</div>
|
|
343
|
-
<div class="sourcecode">
|
|
344
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p>
|
|
345
|
-
<div id="M000029_source" class="dyn-source">
|
|
346
|
-
<pre>
|
|
347
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 97</span>
|
|
348
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directory_entries</span>
|
|
349
|
-
<span class="ruby-identifier">dirs</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-node">"#{path}/"</span>)
|
|
350
|
-
<span class="ruby-identifier">dirs</span>.<span class="ruby-identifier">collect</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">chomp</span>(<span class="ruby-value str">'/'</span>) }
|
|
351
|
-
<span class="ruby-keyword kw">end</span>
|
|
352
|
-
</pre>
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
355
|
-
</div>
|
|
356
|
-
<div class="method">
|
|
357
|
-
<div class="title">
|
|
358
|
-
<a name="M000028"></a><b>document_entries</b>()
|
|
359
|
-
</div>
|
|
360
|
-
<div class="description">
|
|
361
|
-
<p>
|
|
362
|
-
Returns a list of document names.
|
|
363
|
-
</p>
|
|
364
|
-
</div>
|
|
365
|
-
<div class="sourcecode">
|
|
366
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p>
|
|
367
|
-
<div id="M000028_source" class="dyn-source">
|
|
368
|
-
<pre>
|
|
369
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 91</span>
|
|
370
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">document_entries</span>
|
|
371
|
-
<span class="ruby-identifier">entries</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path</span>,<span class="ruby-identifier">f</span>)) }
|
|
372
|
-
<span class="ruby-keyword kw">end</span>
|
|
373
|
-
</pre>
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
<div class="method">
|
|
378
|
-
<div class="title">
|
|
379
|
-
<a name="M000031"></a><b>documents</b>()
|
|
380
|
-
</div>
|
|
381
|
-
<div class="description">
|
|
382
|
-
<p>
|
|
383
|
-
Returns an <a href="../Enumerator.html">Enumerator</a> over all <a
|
|
384
|
-
href="Directory.html#M000031">documents</a> in the directory.
|
|
385
|
-
</p>
|
|
386
|
-
</div>
|
|
387
|
-
<div class="sourcecode">
|
|
388
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p>
|
|
389
|
-
<div id="M000031_source" class="dyn-source">
|
|
390
|
-
<pre>
|
|
391
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 108</span>
|
|
392
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">documents</span>
|
|
393
|
-
<span class="ruby-identifier">document_entries</span>.<span class="ruby-identifier">to_enum</span>(<span class="ruby-identifier">:each</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">FileObject</span>[<span class="ruby-identifier">path</span>, <span class="ruby-identifier">f</span>] }
|
|
394
|
-
<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="M000027"></a><b>entries</b>()
|
|
402
|
-
</div>
|
|
403
|
-
<div class="description">
|
|
404
|
-
<p>
|
|
405
|
-
This returns a list of file names. Unlike traditional Dir.entries method,
|
|
406
|
-
this does not include ’.’ or ’..’.
|
|
407
|
-
</p>
|
|
408
|
-
</div>
|
|
409
|
-
<div class="sourcecode">
|
|
410
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p>
|
|
411
|
-
<div id="M000027_source" class="dyn-source">
|
|
412
|
-
<pre>
|
|
413
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 86</span>
|
|
414
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entries</span>
|
|
415
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">-</span> [<span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span>]
|
|
416
|
-
<span class="ruby-keyword kw">end</span>
|
|
417
|
-
</pre>
|
|
418
|
-
</div>
|
|
419
|
-
</div>
|
|
420
|
-
</div>
|
|
421
|
-
<div class="method">
|
|
422
|
-
<div class="title">
|
|
423
|
-
<a name="M000030"></a><b>files</b>()
|
|
424
|
-
</div>
|
|
425
|
-
<div class="description">
|
|
426
|
-
<p>
|
|
427
|
-
Returns an <a href="../Enumerator.html">Enumerator</a> over all file
|
|
428
|
-
objects in the directory.
|
|
429
|
-
</p>
|
|
430
|
-
</div>
|
|
431
|
-
<div class="sourcecode">
|
|
432
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p>
|
|
433
|
-
<div id="M000030_source" class="dyn-source">
|
|
434
|
-
<pre>
|
|
435
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 103</span>
|
|
436
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files</span>
|
|
437
|
-
<span class="ruby-identifier">entries</span>.<span class="ruby-identifier">to_enum</span>(<span class="ruby-identifier">:each</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">FileObject</span>[<span class="ruby-identifier">path</span>, <span class="ruby-identifier">f</span>] }
|
|
438
|
-
<span class="ruby-keyword kw">end</span>
|
|
439
|
-
</pre>
|
|
440
|
-
</div>
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
<div class="method">
|
|
444
|
-
<div class="title">
|
|
445
|
-
<a name="M000026"></a><b>foreach</b>(&block)
|
|
446
|
-
</div>
|
|
447
|
-
<div class="description">
|
|
448
|
-
<p>
|
|
449
|
-
Loop over the <a href="Directory.html#M000027">entries</a> (this does
|
|
450
|
-
includes ’.’ and ’..’).
|
|
451
|
-
</p>
|
|
452
|
-
</div>
|
|
453
|
-
<div class="sourcecode">
|
|
454
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p>
|
|
455
|
-
<div id="M000026_source" class="dyn-source">
|
|
456
|
-
<pre>
|
|
457
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 80</span>
|
|
458
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">foreach</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
459
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">path</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
460
|
-
<span class="ruby-keyword kw">end</span>
|
|
461
|
-
</pre>
|
|
462
|
-
</div>
|
|
463
|
-
</div>
|
|
464
|
-
</div>
|
|
465
|
-
<div class="method">
|
|
466
|
-
<div class="title">
|
|
467
|
-
<a name="M000019"></a><b>rm_r</b>()
|
|
468
|
-
</div>
|
|
469
|
-
<div class="description">
|
|
470
|
-
<p>
|
|
471
|
-
Remove this directory and all it‘s content.
|
|
472
|
-
</p>
|
|
473
|
-
</div>
|
|
474
|
-
<div class="sourcecode">
|
|
475
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p>
|
|
476
|
-
<div id="M000019_source" class="dyn-source">
|
|
477
|
-
<pre>
|
|
478
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 31</span>
|
|
479
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm_r</span>
|
|
480
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">rm_r</span>(<span class="ruby-identifier">path</span>)
|
|
481
|
-
<span class="ruby-keyword kw">end</span>
|
|
482
|
-
</pre>
|
|
483
|
-
</div>
|
|
484
|
-
</div>
|
|
485
|
-
</div>
|
|
486
|
-
<div class="method">
|
|
487
|
-
<div class="title">
|
|
488
|
-
<a name="M000020"></a><b>rm_rf</b>(list)
|
|
489
|
-
</div>
|
|
490
|
-
<div class="description">
|
|
491
|
-
<p>
|
|
492
|
-
Remove this directory and all it‘s content forcefully.
|
|
493
|
-
</p>
|
|
494
|
-
</div>
|
|
495
|
-
<div class="sourcecode">
|
|
496
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show source</a> ]</p>
|
|
497
|
-
<div id="M000020_source" class="dyn-source">
|
|
498
|
-
<pre>
|
|
499
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 36</span>
|
|
500
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">list</span>)
|
|
501
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">path</span>)
|
|
502
|
-
<span class="ruby-keyword kw">end</span>
|
|
503
|
-
</pre>
|
|
504
|
-
</div>
|
|
505
|
-
</div>
|
|
506
|
-
</div>
|
|
507
|
-
<div class="method">
|
|
508
|
-
<div class="title">
|
|
509
|
-
<a name="M000016"></a><b>rmdir</b>()
|
|
510
|
-
</div>
|
|
511
|
-
<div class="description">
|
|
512
|
-
<p>
|
|
513
|
-
Remove this directory. Fails if not empty.
|
|
514
|
-
</p>
|
|
515
|
-
</div>
|
|
516
|
-
<div class="aka">
|
|
517
|
-
This method is also aliased as
|
|
518
|
-
<a href="Directory.html#M000017">unlink</a>
|
|
519
|
-
<a href="Directory.html#M000018">delete</a>
|
|
520
|
-
</div>
|
|
521
|
-
<div class="sourcecode">
|
|
522
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p>
|
|
523
|
-
<div id="M000016_source" class="dyn-source">
|
|
524
|
-
<pre>
|
|
525
|
-
<span class="ruby-comment cmt"># File lib/folio/directory.rb, line 23</span>
|
|
526
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rmdir</span>
|
|
527
|
-
<span class="ruby-identifier">util</span>.<span class="ruby-identifier">rmdir</span>(<span class="ruby-identifier">path</span>)
|
|
528
|
-
<span class="ruby-keyword kw">end</span>
|
|
529
|
-
</pre>
|
|
530
|
-
</div>
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
<div class="method">
|
|
534
|
-
<div class="title">
|
|
535
|
-
<a name="M000017"></a><b>unlink</b>()
|
|
536
|
-
</div>
|
|
537
|
-
<div class="description">
|
|
538
|
-
<p>
|
|
539
|
-
Alias for <a href="Directory.html#M000016">rmdir</a>
|
|
540
|
-
</p>
|
|
541
|
-
</div>
|
|
542
|
-
</div>
|
|
543
|
-
</div>
|
|
544
|
-
|
|
545
|
-
</div>
|
|
546
|
-
|
|
547
|
-
</body>
|
|
548
|
-
</html>
|