druid-tools 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +16 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/README.md +80 -0
- data/Rakefile +7 -0
- data/VERSION +1 -0
- data/doc/classes/DruidTools.html +132 -0
- data/doc/classes/DruidTools/DifferentContentExistsError.html +111 -0
- data/doc/classes/DruidTools/Druid.html +352 -0
- data/doc/classes/DruidTools/Druid.src/M000001.html +18 -0
- data/doc/classes/DruidTools/Druid.src/M000002.html +18 -0
- data/doc/classes/DruidTools/Druid.src/M000003.html +18 -0
- data/doc/classes/DruidTools/Druid.src/M000004.html +24 -0
- data/doc/classes/DruidTools/Druid.src/M000005.html +18 -0
- data/doc/classes/DruidTools/Druid.src/M000006.html +18 -0
- data/doc/classes/DruidTools/Druid.src/M000007.html +20 -0
- data/doc/classes/DruidTools/Druid.src/M000008.html +25 -0
- data/doc/classes/DruidTools/Druid.src/M000009.html +20 -0
- data/doc/classes/DruidTools/Druid.src/M000010.html +27 -0
- data/doc/classes/DruidTools/Druid.src/M000011.html +24 -0
- data/doc/classes/DruidTools/Druid.src/M000012.html +29 -0
- data/doc/classes/DruidTools/InvalidDruidError.html +111 -0
- data/doc/classes/DruidTools/SameContentExistsError.html +111 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/druid-tools_rb.html +108 -0
- data/doc/files/lib/druid_tools/druid_rb.html +108 -0
- data/doc/files/lib/druid_tools/exceptions_rb.html +101 -0
- data/doc/files/lib/druid_tools/version_rb.html +101 -0
- data/doc/files/lib/druid_tools_rb.html +110 -0
- data/doc/files/spec/druid_tools_spec_rb.html +115 -0
- data/doc/files/spec/spec_helper_rb.html +114 -0
- data/doc/fr_class_index.html +28 -0
- data/doc/fr_file_index.html +30 -0
- data/doc/fr_method_index.html +38 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/druid-tools.gemspec +21 -0
- data/lib/druid-tools.rb +1 -0
- data/lib/druid_tools.rb +5 -0
- data/lib/druid_tools/druid.rb +127 -0
- data/lib/druid_tools/exceptions.rb +5 -0
- data/lib/druid_tools/version.rb +3 -0
- data/spec/druid_tools_spec.rb +255 -0
- data/spec/spec_helper.rb +3 -0
- metadata +133 -0
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 1.8.7@druid-tools --create
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012 Stanford University Library
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# Druid::Tools
|
2
|
+
|
3
|
+
Tools to manipulate DRUID trees and content directories
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
### Get attributes and paths
|
8
|
+
|
9
|
+
d = DruidTools.new('druid:ab123cd4567', '/dor/workspace')
|
10
|
+
d.druid
|
11
|
+
=> "druid:ab123cd4567"
|
12
|
+
d.id
|
13
|
+
=> "ab123cd4567"
|
14
|
+
d.path
|
15
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567"
|
16
|
+
d.content_dir
|
17
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567/content"
|
18
|
+
d.path('content/my_file.jpg')
|
19
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567/content/my_file.jpg"
|
20
|
+
|
21
|
+
### Check whether a druid is valid
|
22
|
+
|
23
|
+
d = DruidTools::Druid.valid?('druid:ab123cd4567')
|
24
|
+
=> true
|
25
|
+
d = DruidTools::Druid.valid?('blah')
|
26
|
+
=> false
|
27
|
+
|
28
|
+
### Manipulate directories and symlinks
|
29
|
+
|
30
|
+
# Make the druid tree
|
31
|
+
d.mkdir
|
32
|
+
# Make a directory within the druid triee
|
33
|
+
d.mkdir('temp')
|
34
|
+
# Remove a druid tree, but only up to the last shared branch directory
|
35
|
+
d.rmdir
|
36
|
+
# Link content from another source into a druid tree
|
37
|
+
d.mkdir_with_final_link('/some/other/content/location')
|
38
|
+
|
39
|
+
### Content-specific methods create the relevant directories if they don't exist
|
40
|
+
|
41
|
+
Pass `false` as a parameter to prevent directory creation, or `true` (default) to create directories.
|
42
|
+
|
43
|
+
d.content_dir(false)
|
44
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567/content"
|
45
|
+
File.directory?(d.content_dir(false))
|
46
|
+
=> false
|
47
|
+
File.directory?(d.content_dir)
|
48
|
+
=> true
|
49
|
+
d.metadata_dir(false)
|
50
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567/metadata"
|
51
|
+
d.temp_dir(false)
|
52
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567/temp"
|
53
|
+
|
54
|
+
### Locate existing content within the druid tree
|
55
|
+
|
56
|
+
# In the correct directory
|
57
|
+
d.find_metadata('contentMetadata.xml')
|
58
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567/metadata/contentMetadata.xml"
|
59
|
+
|
60
|
+
# In other known previous locations, for backward compatibility
|
61
|
+
d.find_metadata('contentMetadata.xml')
|
62
|
+
=> "/dor/workspace/ab/123/cd/4567/ab123cd4567/contentMetadata.xml"
|
63
|
+
|
64
|
+
d.find_metadata('contentMetadata.xml')
|
65
|
+
=> "/dor/workspace/ab/123/cd/4567/contentMetadata.xml"
|
66
|
+
|
67
|
+
d.find_content('this/file/does/not/exist.jpg')
|
68
|
+
=> nil
|
69
|
+
|
70
|
+
## History
|
71
|
+
|
72
|
+
- <b>0.2.6</b> - Fixed VERSION warning message, and documentation cleanup
|
73
|
+
- <b>0.2.5</b> - Added glob pattern as DruidTools::Druid.glob
|
74
|
+
- <b>0.2.4</b> - Allow non-String as .new parameter and added InvalidDruidError
|
75
|
+
- <b>0.2.3</b> - Fine tune behavior of find_filelist_parent
|
76
|
+
- <b>0.2.2</b> - Added find_filelist_parent method allowing search for a set of files
|
77
|
+
- <b>0.2.1</b> - Do not error out during symlink creation if it already exists
|
78
|
+
- <b>0.2.0</b> - Added DruidTools::Druid.valid?
|
79
|
+
- <b>0.1.0</b> - Additional support for alternate content locations
|
80
|
+
- <b>0.0.1</b> - Initial Release
|
data/Rakefile
ADDED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.2.6
|
@@ -0,0 +1,132 @@
|
|
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: DruidTools</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">DruidTools</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/druid_tools/druid_rb.html">
|
59
|
+
lib/druid_tools/druid.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/lib/druid_tools/version_rb.html">
|
63
|
+
lib/druid_tools/version.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/lib/druid_tools_rb.html">
|
67
|
+
lib/druid_tools.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<!-- if includes -->
|
92
|
+
|
93
|
+
<div id="section">
|
94
|
+
|
95
|
+
<div id="class-list">
|
96
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
97
|
+
|
98
|
+
Class <a href="DruidTools/Druid.html" class="link">DruidTools::Druid</a><br />
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<div id="constants-list">
|
103
|
+
<h3 class="section-bar">Constants</h3>
|
104
|
+
|
105
|
+
<div class="name-list">
|
106
|
+
<table summary="Constants">
|
107
|
+
<tr class="top-aligned-row context-row">
|
108
|
+
<td class="context-item-name">VERSION</td>
|
109
|
+
<td>=</td>
|
110
|
+
<td class="context-item-value">File.read(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'VERSION'))).to_s.strip</td>
|
111
|
+
</tr>
|
112
|
+
</table>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<!-- if method_list -->
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
|
126
|
+
|
127
|
+
<div id="validator-badges">
|
128
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</body>
|
132
|
+
</html>
|
@@ -0,0 +1,111 @@
|
|
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: DruidTools::DifferentContentExistsError</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">DruidTools::DifferentContentExistsError</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/druid_tools/exceptions_rb.html">
|
59
|
+
lib/druid_tools/exceptions.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Exception
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
<!-- if includes -->
|
90
|
+
|
91
|
+
<div id="section">
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if method_list -->
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<div id="validator-badges">
|
107
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</body>
|
111
|
+
</html>
|
@@ -0,0 +1,352 @@
|
|
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: DruidTools::Druid</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">DruidTools::Druid</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/druid_tools/druid_rb.html">
|
59
|
+
lib/druid_tools/druid.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000009">find</a>
|
90
|
+
<a href="#M000010">find_filelist_parent</a>
|
91
|
+
<a href="#M000002">glob</a>
|
92
|
+
<a href="#M000005">id</a>
|
93
|
+
<a href="#M000008">mkdir</a>
|
94
|
+
<a href="#M000011">mkdir_with_final_link</a>
|
95
|
+
<a href="#M000004">new</a>
|
96
|
+
<a href="#M000007">path</a>
|
97
|
+
<a href="#M000001">pattern</a>
|
98
|
+
<a href="#M000012">rmdir</a>
|
99
|
+
<a href="#M000006">tree</a>
|
100
|
+
<a href="#M000003">valid?</a>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if includes -->
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<div id="attribute-list">
|
116
|
+
<h3 class="section-bar">Attributes</h3>
|
117
|
+
|
118
|
+
<div class="name-list">
|
119
|
+
<table>
|
120
|
+
<tr class="top-aligned-row context-row">
|
121
|
+
<td class="context-item-name">base</td>
|
122
|
+
<td class="context-item-value"> [RW] </td>
|
123
|
+
<td class="context-item-desc"></td>
|
124
|
+
</tr>
|
125
|
+
<tr class="top-aligned-row context-row">
|
126
|
+
<td class="context-item-name">druid</td>
|
127
|
+
<td class="context-item-value"> [RW] </td>
|
128
|
+
<td class="context-item-desc"></td>
|
129
|
+
</tr>
|
130
|
+
<tr class="top-aligned-row context-row">
|
131
|
+
<td class="context-item-name">prefix</td>
|
132
|
+
<td class="context-item-value"> [RW] </td>
|
133
|
+
<td class="context-item-desc"></td>
|
134
|
+
</tr>
|
135
|
+
</table>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<!-- if method_list -->
|
142
|
+
<div id="methods">
|
143
|
+
<h3 class="section-bar">Public Class methods</h3>
|
144
|
+
|
145
|
+
<div id="method-M000002" class="method-detail">
|
146
|
+
<a name="M000002"></a>
|
147
|
+
|
148
|
+
<div class="method-heading">
|
149
|
+
<a href="Druid.src/M000002.html" target="Code" class="method-signature"
|
150
|
+
onclick="popupCode('Druid.src/M000002.html');return false;">
|
151
|
+
<span class="method-name">glob</span><span class="method-args">()</span>
|
152
|
+
</a>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div class="method-description">
|
156
|
+
<p>
|
157
|
+
@return [String] suitable for use in [Dir#glob]
|
158
|
+
</p>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div id="method-M000004" class="method-detail">
|
163
|
+
<a name="M000004"></a>
|
164
|
+
|
165
|
+
<div class="method-heading">
|
166
|
+
<a href="Druid.src/M000004.html" target="Code" class="method-signature"
|
167
|
+
onclick="popupCode('Druid.src/M000004.html');return false;">
|
168
|
+
<span class="method-name">new</span><span class="method-args">(druid, base='.')</span>
|
169
|
+
</a>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
<div class="method-description">
|
173
|
+
<p>
|
174
|
+
@param druid [String] A valid druid @param base [String] The directory used
|
175
|
+
by <a href="Druid.html#M000007">path</a>
|
176
|
+
</p>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div id="method-M000001" class="method-detail">
|
181
|
+
<a name="M000001"></a>
|
182
|
+
|
183
|
+
<div class="method-heading">
|
184
|
+
<a href="Druid.src/M000001.html" target="Code" class="method-signature"
|
185
|
+
onclick="popupCode('Druid.src/M000001.html');return false;">
|
186
|
+
<span class="method-name">pattern</span><span class="method-args">()</span>
|
187
|
+
</a>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<div class="method-description">
|
191
|
+
<p>
|
192
|
+
@return [Regexp] matches druid:aa111aa1111 or aa111aa1111
|
193
|
+
</p>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<div id="method-M000003" class="method-detail">
|
198
|
+
<a name="M000003"></a>
|
199
|
+
|
200
|
+
<div class="method-heading">
|
201
|
+
<a href="Druid.src/M000003.html" target="Code" class="method-signature"
|
202
|
+
onclick="popupCode('Druid.src/M000003.html');return false;">
|
203
|
+
<span class="method-name">valid?</span><span class="method-args">(druid)</span>
|
204
|
+
</a>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="method-description">
|
208
|
+
<p>
|
209
|
+
@param [String] druid <a href="Druid.html#M000005">id</a> @return [Boolean]
|
210
|
+
true if druid matches <a href="Druid.html#M000001">pattern</a>; otherwise
|
211
|
+
false
|
212
|
+
</p>
|
213
|
+
</div>
|
214
|
+
</div>
|
215
|
+
|
216
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
217
|
+
|
218
|
+
<div id="method-M000009" class="method-detail">
|
219
|
+
<a name="M000009"></a>
|
220
|
+
|
221
|
+
<div class="method-heading">
|
222
|
+
<a href="Druid.src/M000009.html" target="Code" class="method-signature"
|
223
|
+
onclick="popupCode('Druid.src/M000009.html');return false;">
|
224
|
+
<span class="method-name">find</span><span class="method-args">(type, path)</span>
|
225
|
+
</a>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
<div class="method-description">
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
<div id="method-M000010" class="method-detail">
|
233
|
+
<a name="M000010"></a>
|
234
|
+
|
235
|
+
<div class="method-heading">
|
236
|
+
<a href="Druid.src/M000010.html" target="Code" class="method-signature"
|
237
|
+
onclick="popupCode('Druid.src/M000010.html');return false;">
|
238
|
+
<span class="method-name">find_filelist_parent</span><span class="method-args">(type, filelist)</span>
|
239
|
+
</a>
|
240
|
+
</div>
|
241
|
+
|
242
|
+
<div class="method-description">
|
243
|
+
<p>
|
244
|
+
@param [String] type The type of directory being sought
|
245
|
+
(‘content’, ‘metadata’, or ‘temp’)
|
246
|
+
@param [Array<String>,String] filelist The files that are expected to
|
247
|
+
be present in the directory @return [Pathname] Search for and return the
|
248
|
+
pathname of the directory that contains the list of files.
|
249
|
+
</p>
|
250
|
+
<pre>
|
251
|
+
Raises an exception unless a directory is found that contains all the files in the list.
|
252
|
+
</pre>
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
|
256
|
+
<div id="method-M000005" class="method-detail">
|
257
|
+
<a name="M000005"></a>
|
258
|
+
|
259
|
+
<div class="method-heading">
|
260
|
+
<a href="Druid.src/M000005.html" target="Code" class="method-signature"
|
261
|
+
onclick="popupCode('Druid.src/M000005.html');return false;">
|
262
|
+
<span class="method-name">id</span><span class="method-args">()</span>
|
263
|
+
</a>
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div class="method-description">
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div id="method-M000008" class="method-detail">
|
271
|
+
<a name="M000008"></a>
|
272
|
+
|
273
|
+
<div class="method-heading">
|
274
|
+
<a href="Druid.src/M000008.html" target="Code" class="method-signature"
|
275
|
+
onclick="popupCode('Druid.src/M000008.html');return false;">
|
276
|
+
<span class="method-name">mkdir</span><span class="method-args">(extra=nil)</span>
|
277
|
+
</a>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
<div class="method-description">
|
281
|
+
</div>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
<div id="method-M000011" class="method-detail">
|
285
|
+
<a name="M000011"></a>
|
286
|
+
|
287
|
+
<div class="method-heading">
|
288
|
+
<a href="Druid.src/M000011.html" target="Code" class="method-signature"
|
289
|
+
onclick="popupCode('Druid.src/M000011.html');return false;">
|
290
|
+
<span class="method-name">mkdir_with_final_link</span><span class="method-args">(source, extra=nil)</span>
|
291
|
+
</a>
|
292
|
+
</div>
|
293
|
+
|
294
|
+
<div class="method-description">
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
<div id="method-M000007" class="method-detail">
|
299
|
+
<a name="M000007"></a>
|
300
|
+
|
301
|
+
<div class="method-heading">
|
302
|
+
<a href="Druid.src/M000007.html" target="Code" class="method-signature"
|
303
|
+
onclick="popupCode('Druid.src/M000007.html');return false;">
|
304
|
+
<span class="method-name">path</span><span class="method-args">(extra=nil, create=false)</span>
|
305
|
+
</a>
|
306
|
+
</div>
|
307
|
+
|
308
|
+
<div class="method-description">
|
309
|
+
</div>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
<div id="method-M000012" class="method-detail">
|
313
|
+
<a name="M000012"></a>
|
314
|
+
|
315
|
+
<div class="method-heading">
|
316
|
+
<a href="Druid.src/M000012.html" target="Code" class="method-signature"
|
317
|
+
onclick="popupCode('Druid.src/M000012.html');return false;">
|
318
|
+
<span class="method-name">rmdir</span><span class="method-args">(extra=nil)</span>
|
319
|
+
</a>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
<div class="method-description">
|
323
|
+
</div>
|
324
|
+
</div>
|
325
|
+
|
326
|
+
<div id="method-M000006" class="method-detail">
|
327
|
+
<a name="M000006"></a>
|
328
|
+
|
329
|
+
<div class="method-heading">
|
330
|
+
<a href="Druid.src/M000006.html" target="Code" class="method-signature"
|
331
|
+
onclick="popupCode('Druid.src/M000006.html');return false;">
|
332
|
+
<span class="method-name">tree</span><span class="method-args">()</span>
|
333
|
+
</a>
|
334
|
+
</div>
|
335
|
+
|
336
|
+
<div class="method-description">
|
337
|
+
</div>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
|
341
|
+
</div>
|
342
|
+
|
343
|
+
|
344
|
+
</div>
|
345
|
+
|
346
|
+
|
347
|
+
<div id="validator-badges">
|
348
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
</body>
|
352
|
+
</html>
|