94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
# File 'lib/sluice/storage/s3/manifest.rb', line 94
def add_entries(s3, entries)
existing = get_entries(s3)
filenames = entries.map { |filepath|
File.basename(filepath)
} all = (existing + filenames)
manifest = self.class.get_manifest(s3, @s3_location, @manifest_file)
body = all.join("\n")
if manifest.nil?
bucket = s3.directories.get(s3_location.bucket).files.create(
:key => @manifest_file,
:body => body
)
else
manifest.body = body
manifest.save
end
all
end
|