mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
24 lines
694 B
Ruby
24 lines
694 B
Ruby
require 'fog/core/model'
|
|
|
|
module Fog
|
|
module Storage
|
|
class AWS
|
|
|
|
class Version < Fog::Model
|
|
|
|
identity :version, :aliases => 'VersionId'
|
|
|
|
attribute :key, :aliases => 'Key'
|
|
attribute :last_modified, :aliases => ['Last-Modified', 'LastModified']
|
|
attribute :latest, :aliases => 'IsLatest', :type => :boolean
|
|
attribute :content_length, :aliases => ['Content-Length', 'Size'], :type => :integer
|
|
attribute :delete_marker, :type => :boolean
|
|
|
|
def file
|
|
@file ||= collection.file.directory.files.get(key, 'versionId' => version)
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|