Parent

Class/Module Index [+]

Quicksearch

Fog::Storage::InternetArchive::Directory

Public Instance Methods

acl() click to toggle source

acl for internet archive is always public-read

# File lib/fog/internet_archive/models/storage/directory.rb, line 26
def acl
  'public-read'
end
acl=(new_acl) click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 30
def acl=(new_acl)
  'public-read'
end
destroy() click to toggle source

See archive.org/help/abouts3.txt

# File lib/fog/internet_archive/models/storage/directory.rb, line 35
def destroy
  Fog::Logger.warning("fog: Internet Archive does not support deleting a Bucket (i.e. Item).  For details see: See http://archive.org/help/abouts3.txt")
  false
end
files() click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 53
def files
  @files ||= Fog::Storage::InternetArchive::Files.new(:directory => self, :service => service)
end
location() click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 40
def location
  requires :key
  attributes[:location] || bucket_location || self.service.region
end
location=(new_location) click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 45
def location=(new_location)
  if INVALID_LOCATIONS.include?(new_location)
    raise ArgumentError, "location must not include any of #{INVALID_LOCATIONS.join(', ')}. See http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUT.html"
  else
    merge_attributes(:location => new_location)
  end
end
payer() click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 57
def payer
  requires :key
  data = service.get_request_payment(key)
  data.body['Payer']
end
payer=(new_payer) click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 63
def payer=(new_payer)
  requires :key
  service.put_request_payment(key, new_payer)
  @payer = new_payer
end
public=(new_public) click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 69
def public=(new_public)
  'public-read'
end
public_url() click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 73
def public_url
  requires :key
  "http://#{Fog::InternetArchive::DOMAIN_NAME}/details/#{key}"
end
save() click to toggle source
# File lib/fog/internet_archive/models/storage/directory.rb, line 78
def save
  requires :key

  options = {}

  options['x-archive-ignore-preexisting-bucket'] = ignore_preexisting_bucket if ignore_preexisting_bucket
  options['x-archive-interactive-priority'] = interactive_priority if interactive_priority

  set_metadata_array_headers(:collections, options)
  set_metadata_array_headers(:subjects, options)

  if location = attributes[:location] || (self.service.region != 'us-east-1' && self.service.region)
    options['LocationConstraint'] = location
  end

  service.put_bucket(key, options)

  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.