folio 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. data/COPYING +675 -0
  2. data/MANIFEST +234 -0
  3. data/METADATA +8 -0
  4. data/NEWS +9 -0
  5. data/README +69 -0
  6. data/demo/sample1/foo/foo.txt +1 -0
  7. data/demo/sample1/tryme.rb +14 -0
  8. data/doc/rdoc/classes/Folio/BlockDevice.html +117 -0
  9. data/doc/rdoc/classes/Folio/CharacterDevice.html +117 -0
  10. data/doc/rdoc/classes/Folio/Device.html +119 -0
  11. data/doc/rdoc/classes/Folio/Directory.html +420 -0
  12. data/doc/rdoc/classes/Folio/Document.html +261 -0
  13. data/doc/rdoc/classes/Folio/FileNotFound.html +92 -0
  14. data/doc/rdoc/classes/Folio/FileObject.html +1200 -0
  15. data/doc/rdoc/classes/Folio/Link.html +238 -0
  16. data/doc/rdoc/classes/Folio/Pipe.html +131 -0
  17. data/doc/rdoc/classes/Folio/Prompt.html +796 -0
  18. data/doc/rdoc/classes/Folio/Socket.html +115 -0
  19. data/doc/rdoc/classes/Folio.html +148 -0
  20. data/doc/rdoc/created.rid +1 -0
  21. data/doc/rdoc/files/COPYING.html +992 -0
  22. data/doc/rdoc/files/METADATA.html +101 -0
  23. data/doc/rdoc/files/NEWS.html +102 -0
  24. data/doc/rdoc/files/README.html +171 -0
  25. data/doc/rdoc/files/lib/folio/device_rb.html +96 -0
  26. data/doc/rdoc/files/lib/folio/directory_rb.html +96 -0
  27. data/doc/rdoc/files/lib/folio/document_rb.html +96 -0
  28. data/doc/rdoc/files/lib/folio/errors_rb.html +92 -0
  29. data/doc/rdoc/files/lib/folio/fileobject_rb.html +92 -0
  30. data/doc/rdoc/files/lib/folio/link_rb.html +96 -0
  31. data/doc/rdoc/files/lib/folio/pipe_rb.html +96 -0
  32. data/doc/rdoc/files/lib/folio/prompt_rb.html +92 -0
  33. data/doc/rdoc/files/lib/folio/socket_rb.html +96 -0
  34. data/doc/rdoc/files/lib/folio_rb.html +105 -0
  35. data/doc/rdoc/fr_class_index.html +58 -0
  36. data/doc/rdoc/fr_file_index.html +60 -0
  37. data/doc/rdoc/fr_method_index.html +185 -0
  38. data/doc/rdoc/index.html +26 -0
  39. data/doc/rdoc/rdoc-style.css +175 -0
  40. data/doc/ri/Folio/BlockDevice/blockdev%3f-i.yaml +10 -0
  41. data/doc/ri/Folio/BlockDevice/cdesc-BlockDevice.yaml +18 -0
  42. data/doc/ri/Folio/CharacterDevice/cdesc-CharacterDevice.yaml +18 -0
  43. data/doc/ri/Folio/CharacterDevice/chardev%3f-i.yaml +10 -0
  44. data/doc/ri/Folio/Device/cdesc-Device.yaml +18 -0
  45. data/doc/ri/Folio/Device/new-c.yaml +10 -0
  46. data/doc/ri/Folio/Directory/%2b-i.yaml +12 -0
  47. data/doc/ri/Folio/Directory/%2f-i.yaml +13 -0
  48. data/doc/ri/Folio/Directory/cd-i.yaml +12 -0
  49. data/doc/ri/Folio/Directory/cdesc-Directory.yaml +49 -0
  50. data/doc/ri/Folio/Directory/chdir-i.yaml +11 -0
  51. data/doc/ri/Folio/Directory/chmod_r-i.yaml +10 -0
  52. data/doc/ri/Folio/Directory/chown_r-i.yaml +12 -0
  53. data/doc/ri/Folio/Directory/chroot-i.yaml +10 -0
  54. data/doc/ri/Folio/Directory/cp_r-i.yaml +12 -0
  55. data/doc/ri/Folio/Directory/delete-i.yaml +12 -0
  56. data/doc/ri/Folio/Directory/directory%3f-i.yaml +10 -0
  57. data/doc/ri/Folio/Directory/entries-i.yaml +12 -0
  58. data/doc/ri/Folio/Directory/foreach-i.yaml +10 -0
  59. data/doc/ri/Folio/Directory/new-c.yaml +10 -0
  60. data/doc/ri/Folio/Directory/paths-i.yaml +12 -0
  61. data/doc/ri/Folio/Directory/rm_r-i.yaml +10 -0
  62. data/doc/ri/Folio/Directory/rm_rf-i.yaml +10 -0
  63. data/doc/ri/Folio/Directory/rmdir-i.yaml +13 -0
  64. data/doc/ri/Folio/Directory/unlink-i.yaml +12 -0
  65. data/doc/ri/Folio/Document/cdesc-Document.yaml +34 -0
  66. data/doc/ri/Folio/Document/delete-i.yaml +10 -0
  67. data/doc/ri/Folio/Document/executable%3f-i.yaml +10 -0
  68. data/doc/ri/Folio/Document/executable_real%3f-i.yaml +10 -0
  69. data/doc/ri/Folio/Document/file%3f-i.yaml +10 -0
  70. data/doc/ri/Folio/Document/intialize-i.yaml +10 -0
  71. data/doc/ri/Folio/Document/open-i.yaml +10 -0
  72. data/doc/ri/Folio/Document/read-i.yaml +10 -0
  73. data/doc/ri/Folio/Document/readlines-i.yaml +10 -0
  74. data/doc/ri/Folio/Document/truncate-i.yaml +10 -0
  75. data/doc/ri/Folio/Document/unlink-i.yaml +12 -0
  76. data/doc/ri/Folio/FileNotFound/cdesc-FileNotFound.yaml +15 -0
  77. data/doc/ri/Folio/FileObject/%3c%3d%3e-i.yaml +10 -0
  78. data/doc/ri/Folio/FileObject/%3d%3d-i.yaml +10 -0
  79. data/doc/ri/Folio/FileObject/%5b%5d-c.yaml +12 -0
  80. data/doc/ri/Folio/FileObject/atime-i.yaml +10 -0
  81. data/doc/ri/Folio/FileObject/basename-i.yaml +10 -0
  82. data/doc/ri/Folio/FileObject/blockdev%3f-i.yaml +10 -0
  83. data/doc/ri/Folio/FileObject/cdesc-FileObject.yaml +154 -0
  84. data/doc/ri/Folio/FileObject/chardev%3f-i.yaml +10 -0
  85. data/doc/ri/Folio/FileObject/chmod-i.yaml +10 -0
  86. data/doc/ri/Folio/FileObject/chown-i.yaml +10 -0
  87. data/doc/ri/Folio/FileObject/cp-i.yaml +12 -0
  88. data/doc/ri/Folio/FileObject/ctime-i.yaml +10 -0
  89. data/doc/ri/Folio/FileObject/delete-i.yaml +12 -0
  90. data/doc/ri/Folio/FileObject/delete_force-i.yaml +12 -0
  91. data/doc/ri/Folio/FileObject/directory%3f-i.yaml +10 -0
  92. data/doc/ri/Folio/FileObject/dirname-i.yaml +10 -0
  93. data/doc/ri/Folio/FileObject/exist%3f-i.yaml +13 -0
  94. data/doc/ri/Folio/FileObject/exists%3f-i.yaml +12 -0
  95. data/doc/ri/Folio/FileObject/extname-i.yaml +10 -0
  96. data/doc/ri/Folio/FileObject/file%3f-i.yaml +10 -0
  97. data/doc/ri/Folio/FileObject/fnmatch%3f-i.yaml +12 -0
  98. data/doc/ri/Folio/FileObject/fnmatch-i.yaml +11 -0
  99. data/doc/ri/Folio/FileObject/grpowned%3f-i.yaml +10 -0
  100. data/doc/ri/Folio/FileObject/identical%3f-i.yaml +10 -0
  101. data/doc/ri/Folio/FileObject/inspect-i.yaml +12 -0
  102. data/doc/ri/Folio/FileObject/install-i.yaml +12 -0
  103. data/doc/ri/Folio/FileObject/link-i.yaml +11 -0
  104. data/doc/ri/Folio/FileObject/link_force-i.yaml +11 -0
  105. data/doc/ri/Folio/FileObject/ln-i.yaml +12 -0
  106. data/doc/ri/Folio/FileObject/ln_f-i.yaml +12 -0
  107. data/doc/ri/Folio/FileObject/ln_s-i.yaml +12 -0
  108. data/doc/ri/Folio/FileObject/ln_sf-i.yaml +12 -0
  109. data/doc/ri/Folio/FileObject/mtime-i.yaml +10 -0
  110. data/doc/ri/Folio/FileObject/mv-i.yaml +12 -0
  111. data/doc/ri/Folio/FileObject/new-c.yaml +10 -0
  112. data/doc/ri/Folio/FileObject/owned%3f-i.yaml +10 -0
  113. data/doc/ri/Folio/FileObject/pipe%3f-i.yaml +10 -0
  114. data/doc/ri/Folio/FileObject/readable%3f-i.yaml +10 -0
  115. data/doc/ri/Folio/FileObject/readable_real%3f-i.yaml +10 -0
  116. data/doc/ri/Folio/FileObject/relative-i.yaml +12 -0
  117. data/doc/ri/Folio/FileObject/rename-i.yaml +11 -0
  118. data/doc/ri/Folio/FileObject/restat-i.yaml +13 -0
  119. data/doc/ri/Folio/FileObject/rm-i.yaml +12 -0
  120. data/doc/ri/Folio/FileObject/rm_f-i.yaml +12 -0
  121. data/doc/ri/Folio/FileObject/setgid%3f-i.yaml +10 -0
  122. data/doc/ri/Folio/FileObject/setuid%3f-i.yaml +10 -0
  123. data/doc/ri/Folio/FileObject/size%3f-i.yaml +10 -0
  124. data/doc/ri/Folio/FileObject/size-i.yaml +10 -0
  125. data/doc/ri/Folio/FileObject/socket%3f-i.yaml +10 -0
  126. data/doc/ri/Folio/FileObject/split-i.yaml +12 -0
  127. data/doc/ri/Folio/FileObject/stat%21-i.yaml +12 -0
  128. data/doc/ri/Folio/FileObject/stat-i.yaml +12 -0
  129. data/doc/ri/Folio/FileObject/sticky%3f-i.yaml +10 -0
  130. data/doc/ri/Folio/FileObject/symlink-i.yaml +11 -0
  131. data/doc/ri/Folio/FileObject/symlink_force-i.yaml +11 -0
  132. data/doc/ri/Folio/FileObject/to_s-i.yaml +12 -0
  133. data/doc/ri/Folio/FileObject/touch-i.yaml +10 -0
  134. data/doc/ri/Folio/FileObject/unlink-i.yaml +15 -0
  135. data/doc/ri/Folio/FileObject/unlink_force-i.yaml +13 -0
  136. data/doc/ri/Folio/FileObject/util-i.yaml +10 -0
  137. data/doc/ri/Folio/FileObject/utime-i.yaml +10 -0
  138. data/doc/ri/Folio/FileObject/writable%3f-i.yaml +10 -0
  139. data/doc/ri/Folio/FileObject/writable_real%3f-i.yaml +10 -0
  140. data/doc/ri/Folio/FileObject/zero%3f-i.yaml +10 -0
  141. data/doc/ri/Folio/Link/cdesc-Link.yaml +29 -0
  142. data/doc/ri/Folio/Link/lchmod-i.yaml +10 -0
  143. data/doc/ri/Folio/Link/lchown-i.yaml +10 -0
  144. data/doc/ri/Folio/Link/link%3f-i.yaml +10 -0
  145. data/doc/ri/Folio/Link/lstat-i.yaml +10 -0
  146. data/doc/ri/Folio/Link/method_missing-i.yaml +11 -0
  147. data/doc/ri/Folio/Link/new-c.yaml +10 -0
  148. data/doc/ri/Folio/Link/readlink-i.yaml +10 -0
  149. data/doc/ri/Folio/Link/symlink%3f-i.yaml +10 -0
  150. data/doc/ri/Folio/Pipe/cdesc-Pipe.yaml +17 -0
  151. data/doc/ri/Folio/Pipe/new-c.yaml +10 -0
  152. data/doc/ri/Folio/Pipe/pipe%3f-i.yaml +10 -0
  153. data/doc/ri/Folio/Prompt/%2b-i.yaml +13 -0
  154. data/doc/ri/Folio/Prompt/%2f-i.yaml +12 -0
  155. data/doc/ri/Folio/Prompt/%5b%5d-c.yaml +10 -0
  156. data/doc/ri/Folio/Prompt/cd-i.yaml +10 -0
  157. data/doc/ri/Folio/Prompt/cdesc-Prompt.yaml +89 -0
  158. data/doc/ri/Folio/Prompt/chmod-i.yaml +10 -0
  159. data/doc/ri/Folio/Prompt/chmod_r-i.yaml +10 -0
  160. data/doc/ri/Folio/Prompt/chown-i.yaml +12 -0
  161. data/doc/ri/Folio/Prompt/chown_r-i.yaml +10 -0
  162. data/doc/ri/Folio/Prompt/cp-i.yaml +12 -0
  163. data/doc/ri/Folio/Prompt/cp_r-i.yaml +12 -0
  164. data/doc/ri/Folio/Prompt/directories-i.yaml +12 -0
  165. data/doc/ri/Folio/Prompt/entries-i.yaml +13 -0
  166. data/doc/ri/Folio/Prompt/file-i.yaml +12 -0
  167. data/doc/ri/Folio/Prompt/files-i.yaml +12 -0
  168. data/doc/ri/Folio/Prompt/fileutils-i.yaml +10 -0
  169. data/doc/ri/Folio/Prompt/glob-i.yaml +12 -0
  170. data/doc/ri/Folio/Prompt/install-i.yaml +10 -0
  171. data/doc/ri/Folio/Prompt/ln-i.yaml +12 -0
  172. data/doc/ri/Folio/Prompt/ln_s-i.yaml +12 -0
  173. data/doc/ri/Folio/Prompt/ln_sf-i.yaml +10 -0
  174. data/doc/ri/Folio/Prompt/localize-i.yaml +10 -0
  175. data/doc/ri/Folio/Prompt/ls-i.yaml +12 -0
  176. data/doc/ri/Folio/Prompt/mkdir-i.yaml +10 -0
  177. data/doc/ri/Folio/Prompt/mkdir_p-i.yaml +10 -0
  178. data/doc/ri/Folio/Prompt/mode-i.yaml +12 -0
  179. data/doc/ri/Folio/Prompt/mv-i.yaml +12 -0
  180. data/doc/ri/Folio/Prompt/new-c.yaml +11 -0
  181. data/doc/ri/Folio/Prompt/paths-i.yaml +12 -0
  182. data/doc/ri/Folio/Prompt/pwd-i.yaml +10 -0
  183. data/doc/ri/Folio/Prompt/rm-i.yaml +10 -0
  184. data/doc/ri/Folio/Prompt/rm_r-i.yaml +10 -0
  185. data/doc/ri/Folio/Prompt/rm_rf-i.yaml +10 -0
  186. data/doc/ri/Folio/Prompt/rmdir-i.yaml +10 -0
  187. data/doc/ri/Folio/Prompt/to_s-i.yaml +10 -0
  188. data/doc/ri/Folio/Prompt/touch-i.yaml +12 -0
  189. data/doc/ri/Folio/Socket/cdesc-Socket.yaml +16 -0
  190. data/doc/ri/Folio/Socket/new-c.yaml +10 -0
  191. data/doc/ri/Folio/cdesc-Folio.yaml +15 -0
  192. data/doc/ri/created.rid +1 -0
  193. data/lib/folio/device.rb +29 -0
  194. data/lib/folio/directory.rb +83 -0
  195. data/lib/folio/document.rb +66 -0
  196. data/lib/folio/errors.rb +7 -0
  197. data/lib/folio/fileobject.rb +242 -0
  198. data/lib/folio/link.rb +49 -0
  199. data/lib/folio/pipe.rb +16 -0
  200. data/lib/folio/prompt.rb +239 -0
  201. data/lib/folio/socket.rb +14 -0
  202. data/lib/folio.rb +79 -0
  203. data/test/fixture/bar.txt +0 -0
  204. data/test/fixture/foo.txt +0 -0
  205. data/test/test_folio.rb +28 -0
  206. data/test/test_helper.rb +7 -0
  207. metadata +300 -0
@@ -0,0 +1,119 @@
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>
@@ -0,0 +1,420 @@
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="#M000030">+</a></li>
86
+ <li><a href="#M000029">/</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="#M000014">directory?</a></li>
95
+ <li><a href="#M000026">entries</a></li>
96
+ <li><a href="#M000027">foreach</a></li>
97
+ <li><a href="#M000013">new</a></li>
98
+ <li><a href="#M000028">paths</a></li>
99
+ <li><a href="#M000019">rm_r</a></li>
100
+ <li><a href="#M000020">rm_rf</a></li>
101
+ <li><a href="#M000016">rmdir</a></li>
102
+ <li><a href="#M000017">unlink</a></li>
103
+ </ul>
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <div class="sectiontitle">Public Class methods</div>
111
+ <div class="method">
112
+ <div class="title">
113
+ <a name="M000013"></a><b>new</b>(path=nil)
114
+ </div>
115
+ <div class="sourcecode">
116
+ <p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p>
117
+ <div id="M000013_source" class="dyn-source">
118
+ <pre>
119
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 7</span>
120
+ <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>)
121
+ <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>)
122
+ <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>)
123
+ <span class="ruby-keyword kw">end</span>
124
+ </pre>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ <div class="sectiontitle">Public Instance methods</div>
129
+ <div class="method">
130
+ <div class="title">
131
+ <a name="M000030"></a><b>+</b>(fname)
132
+ </div>
133
+ <div class="description">
134
+ <p>
135
+ Alias for #/
136
+ </p>
137
+ </div>
138
+ </div>
139
+ <div class="method">
140
+ <div class="title">
141
+ <a name="M000029"></a><b>/</b>(fname)
142
+ </div>
143
+ <div class="description">
144
+ <p>
145
+ Join <a href="Directory.html#M000028">paths</a>.
146
+ </p>
147
+ </div>
148
+ <div class="aka">
149
+ This method is also aliased as
150
+ <a href="Directory.html#M000030">+</a>
151
+ </div>
152
+ <div class="sourcecode">
153
+ <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p>
154
+ <div id="M000029_source" class="dyn-source">
155
+ <pre>
156
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 75</span>
157
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">/</span>(<span class="ruby-identifier">fname</span>)
158
+ <span class="ruby-constant">FileObject</span>[<span class="ruby-identifier">path</span>, <span class="ruby-identifier">fname</span>]
159
+ <span class="ruby-keyword kw">end</span>
160
+ </pre>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ <div class="method">
165
+ <div class="title">
166
+ <a name="M000024"></a><b>cd</b>(&amp;block)
167
+ </div>
168
+ <div class="description">
169
+ <p>
170
+ Alias for <a href="Directory.html#M000023">chdir</a>
171
+ </p>
172
+ </div>
173
+ </div>
174
+ <div class="method">
175
+ <div class="title">
176
+ <a name="M000023"></a><b>chdir</b>(&amp;block)
177
+ </div>
178
+ <div class="aka">
179
+ This method is also aliased as
180
+ <a href="Directory.html#M000024">cd</a>
181
+ </div>
182
+ <div class="sourcecode">
183
+ <p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p>
184
+ <div id="M000023_source" class="dyn-source">
185
+ <pre>
186
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 51</span>
187
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chdir</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
188
+ <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">&amp;</span><span class="ruby-identifier">block</span>)
189
+ <span class="ruby-keyword kw">end</span>
190
+ </pre>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ <div class="method">
195
+ <div class="title">
196
+ <a name="M000021"></a><b>chmod_r</b>(mode)
197
+ </div>
198
+ <div class="sourcecode">
199
+ <p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p>
200
+ <div id="M000021_source" class="dyn-source">
201
+ <pre>
202
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 37</span>
203
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chmod_r</span>(<span class="ruby-identifier">mode</span>)
204
+ <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>)
205
+ <span class="ruby-keyword kw">end</span>
206
+ </pre>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ <div class="method">
211
+ <div class="title">
212
+ <a name="M000022"></a><b>chown_r</b>(user, group)
213
+ </div>
214
+ <div class="description">
215
+ <p>
216
+ alias_method :chmod_R, :<a href="Directory.html#M000021">chmod_r</a>
217
+ </p>
218
+ </div>
219
+ <div class="sourcecode">
220
+ <p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p>
221
+ <div id="M000022_source" class="dyn-source">
222
+ <pre>
223
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 42</span>
224
+ <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>)
225
+ <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>)
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="M000025"></a><b>chroot</b>(&amp;block)
234
+ </div>
235
+ <div class="sourcecode">
236
+ <p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p>
237
+ <div id="M000025_source" class="dyn-source">
238
+ <pre>
239
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 56</span>
240
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chroot</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
241
+ <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">&amp;</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="M000015"></a><b>cp_r</b>(dest)
250
+ </div>
251
+ <div class="description">
252
+ <p>
253
+ Copy recursively.
254
+ </p>
255
+ </div>
256
+ <div class="sourcecode">
257
+ <p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p>
258
+ <div id="M000015_source" class="dyn-source">
259
+ <pre>
260
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 18</span>
261
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp_r</span>(<span class="ruby-identifier">dest</span>)
262
+ <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>)
263
+ <span class="ruby-keyword kw">end</span>
264
+ </pre>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ <div class="method">
269
+ <div class="title">
270
+ <a name="M000018"></a><b>delete</b>()
271
+ </div>
272
+ <div class="description">
273
+ <p>
274
+ Alias for <a href="Directory.html#M000016">rmdir</a>
275
+ </p>
276
+ </div>
277
+ </div>
278
+ <div class="method">
279
+ <div class="title">
280
+ <a name="M000014"></a><b>directory?</b>()
281
+ </div>
282
+ <div class="sourcecode">
283
+ <p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p>
284
+ <div id="M000014_source" class="dyn-source">
285
+ <pre>
286
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 12</span>
287
+ <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>
288
+ </pre>
289
+ </div>
290
+ </div>
291
+ </div>
292
+ <div class="method">
293
+ <div class="title">
294
+ <a name="M000026"></a><b>entries</b>()
295
+ </div>
296
+ <div class="description">
297
+ <p>
298
+ <a href="Directory.html">Directory</a> <a
299
+ href="Directory.html#M000026">entries</a>. This returns a list of file
300
+ names.
301
+ </p>
302
+ </div>
303
+ <div class="sourcecode">
304
+ <p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p>
305
+ <div id="M000026_source" class="dyn-source">
306
+ <pre>
307
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 61</span>
308
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entries</span>
309
+ <span class="ruby-operator">::</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-identifier">path</span>)
310
+ <span class="ruby-keyword kw">end</span>
311
+ </pre>
312
+ </div>
313
+ </div>
314
+ </div>
315
+ <div class="method">
316
+ <div class="title">
317
+ <a name="M000027"></a><b>foreach</b>(&amp;block)
318
+ </div>
319
+ <div class="sourcecode">
320
+ <p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p>
321
+ <div id="M000027_source" class="dyn-source">
322
+ <pre>
323
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 65</span>
324
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">foreach</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
325
+ <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">&amp;</span><span class="ruby-identifier">block</span>)
326
+ <span class="ruby-keyword kw">end</span>
327
+ </pre>
328
+ </div>
329
+ </div>
330
+ </div>
331
+ <div class="method">
332
+ <div class="title">
333
+ <a name="M000028"></a><b>paths</b>()
334
+ </div>
335
+ <div class="description">
336
+ <p>
337
+ TODO: use enumerator (?)
338
+ </p>
339
+ </div>
340
+ <div class="sourcecode">
341
+ <p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p>
342
+ <div id="M000028_source" class="dyn-source">
343
+ <pre>
344
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 70</span>
345
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">paths</span>
346
+ (<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>]).<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-constant">FileObject</span>[<span class="ruby-identifier">path</span>, <span class="ruby-identifier">f</span>] }
347
+ <span class="ruby-keyword kw">end</span>
348
+ </pre>
349
+ </div>
350
+ </div>
351
+ </div>
352
+ <div class="method">
353
+ <div class="title">
354
+ <a name="M000019"></a><b>rm_r</b>()
355
+ </div>
356
+ <div class="sourcecode">
357
+ <p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p>
358
+ <div id="M000019_source" class="dyn-source">
359
+ <pre>
360
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 29</span>
361
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm_r</span>
362
+ <span class="ruby-identifier">util</span>.<span class="ruby-identifier">rm_r</span>(<span class="ruby-identifier">path</span>)
363
+ <span class="ruby-keyword kw">end</span>
364
+ </pre>
365
+ </div>
366
+ </div>
367
+ </div>
368
+ <div class="method">
369
+ <div class="title">
370
+ <a name="M000020"></a><b>rm_rf</b>(list)
371
+ </div>
372
+ <div class="sourcecode">
373
+ <p class="source-link">[ <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show source</a> ]</p>
374
+ <div id="M000020_source" class="dyn-source">
375
+ <pre>
376
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 33</span>
377
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">list</span>)
378
+ <span class="ruby-identifier">util</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">path</span>)
379
+ <span class="ruby-keyword kw">end</span>
380
+ </pre>
381
+ </div>
382
+ </div>
383
+ </div>
384
+ <div class="method">
385
+ <div class="title">
386
+ <a name="M000016"></a><b>rmdir</b>()
387
+ </div>
388
+ <div class="aka">
389
+ This method is also aliased as
390
+ <a href="Directory.html#M000017">unlink</a>
391
+ <a href="Directory.html#M000018">delete</a>
392
+ </div>
393
+ <div class="sourcecode">
394
+ <p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p>
395
+ <div id="M000016_source" class="dyn-source">
396
+ <pre>
397
+ <span class="ruby-comment cmt"># File lib/folio/directory.rb, line 22</span>
398
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rmdir</span>
399
+ <span class="ruby-identifier">util</span>.<span class="ruby-identifier">rmdir</span>(<span class="ruby-identifier">path</span>)
400
+ <span class="ruby-keyword kw">end</span>
401
+ </pre>
402
+ </div>
403
+ </div>
404
+ </div>
405
+ <div class="method">
406
+ <div class="title">
407
+ <a name="M000017"></a><b>unlink</b>()
408
+ </div>
409
+ <div class="description">
410
+ <p>
411
+ Alias for <a href="Directory.html#M000016">rmdir</a>
412
+ </p>
413
+ </div>
414
+ </div>
415
+ </div>
416
+
417
+ </div>
418
+
419
+ </body>
420
+ </html>