fsdb 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. data/History.txt +6 -0
  2. data/README.txt +1 -1
  3. data/lib/fsdb/database.rb +1 -1
  4. data/rakefile +5 -3
  5. data/test/test-concurrency.rb +5 -3
  6. data/test/test-formats.rb +3 -1
  7. data/test/test-fsdb.rb +5 -3
  8. metadata +10 -148
  9. data/junk/OLDRakefile +0 -98
  10. data/junk/OLDRakefile2 +0 -55
  11. data/junk/check-cache.rb +0 -18
  12. data/junk/create-lock.rb +0 -25
  13. data/junk/doc/old-api/classes/FSDB.html +0 -139
  14. data/junk/doc/old-api/classes/FSDB/Database.html +0 -953
  15. data/junk/doc/old-api/classes/FSDB/Database.src/M000029.html +0 -16
  16. data/junk/doc/old-api/classes/FSDB/Database.src/M000030.html +0 -16
  17. data/junk/doc/old-api/classes/FSDB/Database.src/M000031.html +0 -16
  18. data/junk/doc/old-api/classes/FSDB/Database.src/M000032.html +0 -16
  19. data/junk/doc/old-api/classes/FSDB/Database.src/M000033.html +0 -33
  20. data/junk/doc/old-api/classes/FSDB/Database.src/M000034.html +0 -18
  21. data/junk/doc/old-api/classes/FSDB/Database.src/M000035.html +0 -22
  22. data/junk/doc/old-api/classes/FSDB/Database.src/M000036.html +0 -16
  23. data/junk/doc/old-api/classes/FSDB/Database.src/M000037.html +0 -22
  24. data/junk/doc/old-api/classes/FSDB/Database.src/M000038.html +0 -43
  25. data/junk/doc/old-api/classes/FSDB/Database.src/M000039.html +0 -25
  26. data/junk/doc/old-api/classes/FSDB/Database.src/M000040.html +0 -43
  27. data/junk/doc/old-api/classes/FSDB/Database.src/M000041.html +0 -23
  28. data/junk/doc/old-api/classes/FSDB/Database.src/M000042.html +0 -22
  29. data/junk/doc/old-api/classes/FSDB/Database.src/M000043.html +0 -16
  30. data/junk/doc/old-api/classes/FSDB/Database.src/M000044.html +0 -16
  31. data/junk/doc/old-api/classes/FSDB/Database.src/M000045.html +0 -18
  32. data/junk/doc/old-api/classes/FSDB/Database.src/M000046.html +0 -18
  33. data/junk/doc/old-api/classes/FSDB/Database.src/M000047.html +0 -18
  34. data/junk/doc/old-api/classes/FSDB/Database.src/M000048.html +0 -16
  35. data/junk/doc/old-api/classes/FSDB/Database.src/M000049.html +0 -71
  36. data/junk/doc/old-api/classes/FSDB/Database.src/M000050.html +0 -43
  37. data/junk/doc/old-api/classes/FSDB/Database.src/M000051.html +0 -53
  38. data/junk/doc/old-api/classes/FSDB/Database.src/M000052.html +0 -44
  39. data/junk/doc/old-api/classes/FSDB/Database.src/M000053.html +0 -39
  40. data/junk/doc/old-api/classes/FSDB/Database.src/M000054.html +0 -72
  41. data/junk/doc/old-api/classes/FSDB/Database.src/M000055.html +0 -39
  42. data/junk/doc/old-api/classes/FSDB/Database.src/M000056.html +0 -18
  43. data/junk/doc/old-api/classes/FSDB/Database.src/M000057.html +0 -18
  44. data/junk/doc/old-api/classes/FSDB/Database.src/M000058.html +0 -18
  45. data/junk/doc/old-api/classes/FSDB/Database.src/M000059.html +0 -18
  46. data/junk/doc/old-api/classes/FSDB/Database.src/M000060.html +0 -18
  47. data/junk/doc/old-api/classes/FSDB/Database.src/M000061.html +0 -23
  48. data/junk/doc/old-api/classes/FSDB/Database.src/M000062.html +0 -23
  49. data/junk/doc/old-api/classes/FSDB/Database.src/M000063.html +0 -18
  50. data/junk/doc/old-api/classes/FSDB/Database.src/M000064.html +0 -18
  51. data/junk/doc/old-api/classes/FSDB/Database/AbortedTransaction.html +0 -118
  52. data/junk/doc/old-api/classes/FSDB/Database/CreateFileError.html +0 -120
  53. data/junk/doc/old-api/classes/FSDB/Database/DirIsImmutableError.html +0 -117
  54. data/junk/doc/old-api/classes/FSDB/Database/DirNotEmptyError.html +0 -117
  55. data/junk/doc/old-api/classes/FSDB/Database/FormatError.html +0 -117
  56. data/junk/doc/old-api/classes/FSDB/Database/MissingFileError.html +0 -117
  57. data/junk/doc/old-api/classes/FSDB/Database/MissingObjectError.html +0 -117
  58. data/junk/doc/old-api/classes/FSDB/Database/NotDirError.html +0 -118
  59. data/junk/doc/old-api/classes/FSDB/Database/PathComponentError.html +0 -120
  60. data/junk/doc/old-api/classes/FSDB/DatabaseDebuggable.html +0 -148
  61. data/junk/doc/old-api/classes/FSDB/DatabaseDebuggable.src/M000005.html +0 -21
  62. data/junk/doc/old-api/classes/FSDB/DatabaseDebuggable.src/M000007.html +0 -21
  63. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.html +0 -210
  64. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000006.html +0 -22
  65. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000007.html +0 -22
  66. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000008.html +0 -22
  67. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000009.html +0 -22
  68. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000010.html +0 -22
  69. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000011.html +0 -22
  70. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000012.html +0 -22
  71. data/junk/doc/old-api/classes/FSDB/DirectoryIterators.src/M000013.html +0 -22
  72. data/junk/doc/old-api/classes/FSDB/ForkSafely.html +0 -126
  73. data/junk/doc/old-api/classes/FSDB/Modex.html +0 -237
  74. data/junk/doc/old-api/classes/FSDB/Modex.src/M000024.html +0 -21
  75. data/junk/doc/old-api/classes/FSDB/Modex.src/M000025.html +0 -30
  76. data/junk/doc/old-api/classes/FSDB/Modex.src/M000026.html +0 -21
  77. data/junk/doc/old-api/classes/FSDB/Modex.src/M000027.html +0 -30
  78. data/junk/doc/old-api/classes/FSDB/Modex.src/M000028.html +0 -44
  79. data/junk/doc/old-api/classes/FSDB/Modex.src/M000029.html +0 -26
  80. data/junk/doc/old-api/classes/FSDB/Modex.src/M000030.html +0 -48
  81. data/junk/doc/old-api/classes/FSDB/Modex/ForkSafely.html +0 -105
  82. data/junk/doc/old-api/classes/FSDB/Mutex.html +0 -244
  83. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000018.html +0 -19
  84. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000019.html +0 -18
  85. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000020.html +0 -19
  86. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000021.html +0 -18
  87. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000022.html +0 -23
  88. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000023.html +0 -30
  89. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000024.html +0 -26
  90. data/junk/doc/old-api/classes/FSDB/Mutex.src/M000025.html +0 -21
  91. data/junk/doc/old-api/classes/FSDB/Mutex/ForkSafely.html +0 -105
  92. data/junk/doc/old-api/classes/FSDB/PathUtilities.html +0 -257
  93. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000012.html +0 -23
  94. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000013.html +0 -18
  95. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000014.html +0 -23
  96. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000015.html +0 -18
  97. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000016.html +0 -18
  98. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000017.html +0 -22
  99. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000018.html +0 -23
  100. data/junk/doc/old-api/classes/FSDB/PathUtilities.src/M000019.html +0 -18
  101. data/junk/doc/old-api/classes/FSDB/PathUtilities/InvalidPathError.html +0 -111
  102. data/junk/doc/old-api/classes/File.html +0 -272
  103. data/junk/doc/old-api/classes/File.src/M000001.html +0 -17
  104. data/junk/doc/old-api/classes/File.src/M000002.html +0 -17
  105. data/junk/doc/old-api/classes/File.src/M000003.html +0 -20
  106. data/junk/doc/old-api/classes/File.src/M000004.html +0 -20
  107. data/junk/doc/old-api/classes/File.src/M000005.html +0 -32
  108. data/junk/doc/old-api/classes/File.src/M000006.html +0 -32
  109. data/junk/doc/old-api/created.rid +0 -1
  110. data/junk/doc/old-api/files/README.html +0 -112
  111. data/junk/doc/old-api/files/RELEASE-NOTES.html +0 -233
  112. data/junk/doc/old-api/files/fsdb_txt.html +0 -888
  113. data/junk/doc/old-api/files/lib/fsdb/database_rb.html +0 -115
  114. data/junk/doc/old-api/files/lib/fsdb/file-lock_rb.html +0 -109
  115. data/junk/doc/old-api/files/lib/fsdb/modex_rb.html +0 -121
  116. data/junk/doc/old-api/files/lib/fsdb/mutex_rb.html +0 -108
  117. data/junk/doc/old-api/files/lib/fsdb/util_rb.html +0 -108
  118. data/junk/doc/old-api/fr_class_index.html +0 -47
  119. data/junk/doc/old-api/fr_file_index.html +0 -34
  120. data/junk/doc/old-api/fr_method_index.html +0 -90
  121. data/junk/doc/old-api/index.html +0 -24
  122. data/junk/doc/old-api/rdoc-style.css +0 -208
  123. data/junk/file-lock-nb.rb +0 -15
  124. data/junk/fl.rb +0 -144
  125. data/junk/flock-test.rb +0 -39
  126. data/junk/fsdb.kateproject +0 -47
  127. data/junk/fsdb.prj +0 -196
  128. data/junk/fsdb.sf +0 -46
  129. data/junk/insert-dir.rb +0 -48
  130. data/junk/lock-test-bug.rb +0 -150
  131. data/junk/lock-test-too-simple.rb +0 -136
  132. data/junk/lock-test.rb +0 -151
  133. data/junk/mkrdoc +0 -7
  134. data/junk/restore-fsdb.rb +0 -37
  135. data/junk/rf.txt +0 -5
  136. data/junk/solaris-bug-fixed.rb +0 -184
  137. data/junk/solaris-bug.rb +0 -182
  138. data/junk/solaris-bug.txt +0 -43
  139. data/junk/sync.rb +0 -327
  140. data/junk/test-file-lock.html +0 -86
  141. data/junk/test-file-lock.rb +0 -84
  142. data/junk/test-processes.rb +0 -131
  143. data/junk/test-threads.rb +0 -113
  144. data/junk/wiki-mutex.rb +0 -108
  145. data/misc/fsdb-blorubu.txt +0 -47
  146. data/misc/mtime-and-file-id.txt +0 -23
  147. data/misc/posixlock.txt +0 -148
@@ -1,16 +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
-
6
- <html>
7
- <head>
8
- <title>default_fetch (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 469</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_fetch</span>(<span class="ruby-identifier">path</span>); <span class="ruby-keyword kw">nil</span>; <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,71 +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
-
6
- <html>
7
- <head>
8
- <title>browse (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 484</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">browse</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">&quot;/&quot;</span>) <span class="ruby-comment cmt"># :yields: object</span>
15
- <span class="ruby-identifier">abs_path</span> = <span class="ruby-identifier">absolute</span>(<span class="ruby-identifier">path</span>)
16
- <span class="ruby-identifier">file_id</span> = <span class="ruby-identifier">get_file_id</span>(<span class="ruby-identifier">abs_path</span>)
17
-
18
- <span class="ruby-comment cmt">## put these outside method, and pass in params?</span>
19
- <span class="ruby-identifier">do_when_first</span> = <span class="ruby-identifier">proc</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
20
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">file_handle</span>
21
-
22
- <span class="ruby-keyword kw">begin</span>
23
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span>
24
- <span class="ruby-identifier">abs_path</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\/+$/</span>, <span class="ruby-value str">&quot;&quot;</span>)
25
- <span class="ruby-keyword kw">end</span>
26
- <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">abs_path</span>, <span class="ruby-value str">&quot;r&quot;</span>)
27
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
28
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingFileError</span>
29
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EINTR</span>
30
- <span class="ruby-keyword kw">retry</span>
31
- <span class="ruby-keyword kw">end</span>
32
-
33
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">file_handle</span> = <span class="ruby-identifier">f</span>
34
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">lock_shared</span>(<span class="ruby-ivar">@lock_type</span>)
35
- <span class="ruby-identifier">identify_file_type</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">abs_path</span>)
36
- <span class="ruby-comment cmt">## could avoid if cache_object says so</span>
37
- <span class="ruby-identifier">object</span> = <span class="ruby-identifier">cache_object</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>)
38
- <span class="ruby-keyword kw">end</span>
39
-
40
- <span class="ruby-identifier">do_when_last</span> = <span class="ruby-identifier">proc</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
41
- <span class="ruby-comment cmt"># last one out closes the file</span>
42
- <span class="ruby-identifier">f</span> = <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">file_handle</span>
43
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">f</span>
44
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
45
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">file_handle</span> = <span class="ruby-keyword kw">nil</span>
46
- <span class="ruby-keyword kw">end</span>
47
- <span class="ruby-keyword kw">end</span>
48
-
49
- <span class="ruby-identifier">object_shared</span>(<span class="ruby-identifier">file_id</span>, <span class="ruby-identifier">do_when_first</span>, <span class="ruby-identifier">do_when_last</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
50
- <span class="ruby-identifier">object</span> = <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">just_gimme_the_damn_object!</span>
51
- <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">object</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
52
- <span class="ruby-keyword kw">end</span>
53
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NotDirError</span>
54
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>, <span class="ruby-node">&quot;Not a directory - #{path} in #{inspect}&quot;</span>
55
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">MissingFileError</span>
56
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
57
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CAN_OPEN_DIR</span>
58
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>) <span class="ruby-comment cmt">### redundant!</span>
59
- <span class="ruby-keyword kw">yield</span> <span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">DIR_LOAD_FROM_PATH</span>[<span class="ruby-identifier">abs_path</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
60
- <span class="ruby-keyword kw">end</span>
61
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
62
- <span class="ruby-identifier">default_browse</span>(<span class="ruby-identifier">path</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">x</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>}
63
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">AbortedTransaction</span>
64
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span>
65
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CAN_OPEN_DIR</span>
66
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
67
- <span class="ruby-comment cmt"># on some platforms, opening a dir raises EACCESS</span>
68
- <span class="ruby-keyword kw">yield</span> <span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">DIR_LOAD_FROM_PATH</span>[<span class="ruby-identifier">abs_path</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
69
- <span class="ruby-keyword kw">end</span></pre>
70
- </body>
71
- </html>
@@ -1,43 +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
-
6
- <html>
7
- <head>
8
- <title>edit (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 545</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">&quot;/&quot;</span>)
15
- <span class="ruby-identifier">abs_path</span> = <span class="ruby-identifier">absolute</span>(<span class="ruby-identifier">path</span>)
16
- <span class="ruby-identifier">file_id</span> = <span class="ruby-identifier">get_file_id</span>(<span class="ruby-identifier">abs_path</span>)
17
- <span class="ruby-identifier">object_exclusive</span> <span class="ruby-identifier">file_id</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
18
- <span class="ruby-identifier">open_write_lock</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
19
- <span class="ruby-identifier">object</span> = <span class="ruby-identifier">cache_object</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>)
20
- <span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">object</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
21
- <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">f</span>)
22
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">f</span>.<span class="ruby-identifier">mtime</span>, <span class="ruby-identifier">inc_version_of</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>), <span class="ruby-identifier">object</span>)
23
- <span class="ruby-identifier">result</span>
24
- <span class="ruby-keyword kw">end</span>
25
- <span class="ruby-keyword kw">end</span>
26
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">DirIsImmutableError</span>
27
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DirIsImmutableError</span>, <span class="ruby-node">&quot;Cannot edit dir #{path} in #{inspect}&quot;</span>
28
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NotDirError</span>
29
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>, <span class="ruby-node">&quot;Not a directory - #{path} in #{inspect}&quot;</span>
30
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">MissingFileError</span>
31
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DirIsImmutableError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span> <span class="ruby-keyword kw">and</span>
32
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
33
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
34
- <span class="ruby-identifier">default_edit</span>(<span class="ruby-identifier">path</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">x</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>}
35
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">AbortedTransaction</span>
36
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>) <span class="ruby-comment cmt"># The cached object may have edits which are not valid.</span>
37
- <span class="ruby-keyword kw">nil</span>
38
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
39
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
40
- <span class="ruby-identifier">raise</span>
41
- <span class="ruby-keyword kw">end</span></pre>
42
- </body>
43
- </html>
@@ -1,53 +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
-
6
- <html>
7
- <head>
8
- <title>replace (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 584</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace</span>(<span class="ruby-identifier">path</span>)
15
- <span class="ruby-identifier">abs_path</span> = <span class="ruby-identifier">absolute</span>(<span class="ruby-identifier">path</span>)
16
- <span class="ruby-identifier">file_id</span> = <span class="ruby-identifier">make_file_id</span>(<span class="ruby-identifier">abs_path</span>)
17
- <span class="ruby-identifier">object_exclusive</span> <span class="ruby-identifier">file_id</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
18
- <span class="ruby-identifier">open_write_lock</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
19
- <span class="ruby-identifier">old_object</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">stat</span>.<span class="ruby-identifier">zero?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">cache_object</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>)
20
- <span class="ruby-identifier">object</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">old_object</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
21
- <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">f</span>)
22
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">f</span>.<span class="ruby-identifier">mtime</span>, <span class="ruby-identifier">inc_version_of</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>), <span class="ruby-identifier">object</span>)
23
- <span class="ruby-identifier">old_object</span>
24
- <span class="ruby-keyword kw">end</span>
25
- <span class="ruby-keyword kw">end</span>
26
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">DirIsImmutableError</span>
27
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DirIsImmutableError</span>, <span class="ruby-node">&quot;Cannot replace dir #{path} in #{inspect}&quot;</span>
28
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NotDirError</span>
29
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>, <span class="ruby-node">&quot;Not a directory - #{path} in #{inspect}&quot;</span>
30
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">AbortedTransaction</span>
31
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>) <span class="ruby-comment cmt"># The cached object may have edits which are not valid.</span>
32
- <span class="ruby-keyword kw">nil</span>
33
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">FormatError</span>
34
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
35
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>)
36
- <span class="ruby-identifier">raise</span>
37
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">PathComponentError</span>
38
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">PathComponentError</span>, <span class="ruby-node">&quot;Some component of #{path} in #{inspect} &quot;</span> <span class="ruby-operator">+</span>
39
- <span class="ruby-value str">&quot;already exists and is not a directory&quot;</span>
40
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">CreateFileError</span>
41
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">CreateFileError</span>, <span class="ruby-node">&quot;Cannot create file at #{path} in #{inspect}&quot;</span>
42
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">MissingFileError</span>
43
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
44
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DirIsImmutableError</span>
45
- <span class="ruby-keyword kw">else</span>
46
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>
47
- <span class="ruby-keyword kw">end</span>
48
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
49
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
50
- <span class="ruby-identifier">raise</span>
51
- <span class="ruby-keyword kw">end</span></pre>
52
- </body>
53
- </html>
@@ -1,44 +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
-
6
- <html>
7
- <head>
8
- <title>insert (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 631</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">object</span>)
15
- <span class="ruby-identifier">abs_path</span> = <span class="ruby-identifier">absolute</span>(<span class="ruby-identifier">path</span>)
16
- <span class="ruby-identifier">file_id</span> = <span class="ruby-identifier">make_file_id</span>(<span class="ruby-identifier">abs_path</span>)
17
- <span class="ruby-identifier">object_exclusive</span> <span class="ruby-identifier">file_id</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
18
- <span class="ruby-identifier">open_write_lock</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
19
- <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">f</span>)
20
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">f</span>.<span class="ruby-identifier">mtime</span>, <span class="ruby-identifier">inc_version_of</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>), <span class="ruby-identifier">object</span>)
21
- <span class="ruby-identifier">object</span>
22
- <span class="ruby-keyword kw">end</span>
23
- <span class="ruby-keyword kw">end</span>
24
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NotDirError</span>
25
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>, <span class="ruby-node">&quot;Not a directory - #{path} in #{inspect}&quot;</span>
26
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">FormatError</span>
27
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>)
28
- <span class="ruby-identifier">raise</span>
29
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">PathComponentError</span>
30
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">PathComponentError</span>, <span class="ruby-node">&quot;Some component of #{path} in #{inspect} &quot;</span> <span class="ruby-operator">+</span>
31
- <span class="ruby-value str">&quot;already exists and is not a directory&quot;</span>
32
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">CreateFileError</span>
33
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span> <span class="ruby-keyword kw">and</span> <span class="ruby-regexp re">/\/$/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">path</span>
34
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DirIsImmutableError</span>
35
- <span class="ruby-keyword kw">else</span>
36
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">CreateFileError</span>, <span class="ruby-node">&quot;Cannot create file at #{path} in #{inspect}&quot;</span>
37
- <span class="ruby-keyword kw">end</span>
38
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">MissingFileError</span>
39
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DirIsImmutableError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span>
40
- <span class="ruby-keyword kw">ensure</span>
41
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>) <span class="ruby-comment cmt"># no one else can get this copy of object</span>
42
- <span class="ruby-keyword kw">end</span></pre>
43
- </body>
44
- </html>
@@ -1,39 +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
-
6
- <html>
7
- <head>
8
- <title>fetch (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 738</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">&quot;/&quot;</span>)
15
- <span class="ruby-identifier">abs_path</span> = <span class="ruby-identifier">absolute</span>(<span class="ruby-identifier">path</span>)
16
- <span class="ruby-identifier">file_id</span> = <span class="ruby-identifier">get_file_id</span>(<span class="ruby-identifier">abs_path</span>)
17
- <span class="ruby-identifier">object_exclusive</span> <span class="ruby-identifier">file_id</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
18
- <span class="ruby-identifier">open_read_lock</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
19
- <span class="ruby-identifier">object</span> = <span class="ruby-identifier">cache_object</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>)
20
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">stale!</span>
21
- <span class="ruby-identifier">object</span>
22
- <span class="ruby-keyword kw">end</span>
23
- <span class="ruby-keyword kw">end</span>
24
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NotDirError</span>
25
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>, <span class="ruby-node">&quot;Not a directory - #{path} in #{inspect}&quot;</span>
26
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">MissingFileError</span>
27
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
28
- <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">DIR_LOAD_FROM_PATH</span>[<span class="ruby-identifier">abs_path</span>]
29
- <span class="ruby-keyword kw">end</span>
30
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
31
- <span class="ruby-identifier">default_fetch</span>(<span class="ruby-identifier">path</span>)
32
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span>
33
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CAN_OPEN_DIR</span>
34
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
35
- <span class="ruby-comment cmt"># on some platforms, opening a dir raises EACCESS</span>
36
- <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">DIR_LOAD_FROM_PATH</span>[<span class="ruby-identifier">abs_path</span>]
37
- <span class="ruby-keyword kw">end</span></pre>
38
- </body>
39
- </html>
@@ -1,72 +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
-
6
- <html>
7
- <head>
8
- <title>delete (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 673</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">load</span>=<span class="ruby-keyword kw">true</span>) <span class="ruby-comment cmt"># :yields: object</span>
15
- <span class="ruby-identifier">abs_path</span> = <span class="ruby-identifier">absolute</span>(<span class="ruby-identifier">path</span>)
16
- <span class="ruby-identifier">file_id</span> = <span class="ruby-identifier">get_file_id</span>(<span class="ruby-identifier">abs_path</span>)
17
- <span class="ruby-identifier">delete_later</span> = <span class="ruby-keyword kw">false</span>
18
- <span class="ruby-identifier">object_exclusive</span> <span class="ruby-identifier">file_id</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
19
- <span class="ruby-identifier">open_write_lock</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
20
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">load</span>
21
- <span class="ruby-identifier">object</span> = <span class="ruby-identifier">cache_object</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>)
22
- <span class="ruby-identifier">result</span> = <span class="ruby-identifier">block_given?</span> <span class="ruby-value">? </span>(<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">object</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">object</span>
23
- <span class="ruby-keyword kw">else</span>
24
- <span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">true</span>
25
- <span class="ruby-keyword kw">end</span>
26
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CAN_DELETE_OPEN_FILE</span>
27
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>)
28
- <span class="ruby-keyword kw">else</span>
29
- <span class="ruby-identifier">delete_later</span> = <span class="ruby-keyword kw">true</span>
30
- <span class="ruby-keyword kw">end</span>
31
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">stale!</span>
32
- <span class="ruby-identifier">del_version_of</span>(<span class="ruby-identifier">f</span>)
33
- <span class="ruby-identifier">result</span>
34
- <span class="ruby-keyword kw">end</span>
35
- <span class="ruby-keyword kw">end</span>
36
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">DirIsImmutableError</span>
37
- <span class="ruby-keyword kw">begin</span>
38
- <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>)
39
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
40
- <span class="ruby-comment cmt"># Someone else got it first.</span>
41
- <span class="ruby-keyword kw">end</span>
42
- <span class="ruby-keyword kw">true</span>
43
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NotDirError</span>
44
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>, <span class="ruby-node">&quot;Not a directory - #{path} in #{inspect}&quot;</span>
45
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">MissingFileError</span>
46
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-identifier">abs_path</span>) <span class="ruby-comment cmt"># get_file_id fails if target deleted</span>
47
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
48
- <span class="ruby-keyword kw">end</span>
49
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
50
- <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>)
51
- <span class="ruby-keyword kw">end</span>
52
- <span class="ruby-keyword kw">nil</span>
53
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOTEMPTY</span>
54
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">DirNotEmptyError</span>, <span class="ruby-node">&quot;Directory not empty - #{path} in #{inspect}&quot;</span>
55
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span>
56
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CAN_OPEN_DIR</span>
57
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
58
- <span class="ruby-comment cmt"># on some platforms, opening a dir raises EACCESS</span>
59
- <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>)
60
- <span class="ruby-keyword kw">true</span>
61
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">AbortedTransaction</span>
62
- <span class="ruby-keyword kw">ensure</span>
63
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delete_later</span>
64
- <span class="ruby-keyword kw">begin</span>
65
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">abs_path</span>)
66
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
67
- <span class="ruby-keyword kw">end</span>
68
- <span class="ruby-keyword kw">end</span>
69
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
70
- <span class="ruby-keyword kw">end</span></pre>
71
- </body>
72
- </html>
@@ -1,39 +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
-
6
- <html>
7
- <head>
8
- <title>fetch (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 738</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">&quot;/&quot;</span>)
15
- <span class="ruby-identifier">abs_path</span> = <span class="ruby-identifier">absolute</span>(<span class="ruby-identifier">path</span>)
16
- <span class="ruby-identifier">file_id</span> = <span class="ruby-identifier">get_file_id</span>(<span class="ruby-identifier">abs_path</span>)
17
- <span class="ruby-identifier">object_exclusive</span> <span class="ruby-identifier">file_id</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cache_entry</span><span class="ruby-operator">|</span>
18
- <span class="ruby-identifier">open_read_lock</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
19
- <span class="ruby-identifier">object</span> = <span class="ruby-identifier">cache_object</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">cache_entry</span>)
20
- <span class="ruby-identifier">cache_entry</span>.<span class="ruby-identifier">stale!</span>
21
- <span class="ruby-identifier">object</span>
22
- <span class="ruby-keyword kw">end</span>
23
- <span class="ruby-keyword kw">end</span>
24
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NotDirError</span>
25
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotDirError</span>, <span class="ruby-node">&quot;Not a directory - #{path} in #{inspect}&quot;</span>
26
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">MissingFileError</span>
27
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">PLATFORM_IS_WINDOWS_ME</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
28
- <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">DIR_LOAD_FROM_PATH</span>[<span class="ruby-identifier">abs_path</span>]
29
- <span class="ruby-keyword kw">end</span>
30
- <span class="ruby-identifier">clear_entry</span>(<span class="ruby-identifier">file_id</span>)
31
- <span class="ruby-identifier">default_fetch</span>(<span class="ruby-identifier">path</span>)
32
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span>
33
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CAN_OPEN_DIR</span>
34
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">abs_path</span>)
35
- <span class="ruby-comment cmt"># on some platforms, opening a dir raises EACCESS</span>
36
- <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Formats</span><span class="ruby-operator">::</span><span class="ruby-constant">DIR_LOAD_FROM_PATH</span>[<span class="ruby-identifier">abs_path</span>]
37
- <span class="ruby-keyword kw">end</span></pre>
38
- </body>
39
- </html>
@@ -1,18 +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
-
6
- <html>
7
- <head>
8
- <title>dump (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 772</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">f</span>)
15
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">format</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">f</span>)
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +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
-
6
- <html>
7
- <head>
8
- <title>load (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 767</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">f</span>)
15
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">format</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">f</span>)
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +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
-
6
- <html>
7
- <head>
8
- <title>dump (FSDB::Database)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/fsdb/database.rb, line 772</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">f</span>)
15
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">format</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">f</span>)
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>