Class: Duracloud::ChunkedContent

Inherits:
Content show all
Defined in:
lib/duracloud/chunked_content.rb

Constant Summary

Constants inherited from Content

Duracloud::Content::CHUNK_SIZE, Duracloud::Content::COPY_SOURCE_HEADER, Duracloud::Content::COPY_SOURCE_STORE_HEADER, Duracloud::Content::MANIFEST_EXT

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Content

#copy, create, delete, #download, #empty?, exist?, #human_size, #inspect, #move, #space

Methods inherited from AbstractEntity

#delete, #deleted?, #load_properties, #persisted?, #properties, #save

Class Method Details

.find(**kwargs) ⇒ Object



4
5
6
7
8
# File 'lib/duracloud/chunked_content.rb', line 4

def self.find(**kwargs)
  new(**kwargs).tap do |content|
    content.manifest
  end
end

Instance Method Details

#chunked?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/duracloud/chunked_content.rb', line 20

def chunked?
  true
end

#manifestObject



10
11
12
13
14
15
16
17
18
# File 'lib/duracloud/chunked_content.rb', line 10

def manifest
  if @manifest.nil?
    @manifest = ContentManifest.find(space_id: space_id,
                                     manifest_id: content_id + MANIFEST_EXT,
                                     store_id: store_id)
    load_properties
  end
  @manifest
end