GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Net::Mosso::CloudFiles::Container(3) User Contributed Perl Documentation Net::Mosso::CloudFiles::Container(3)

Net::Mosso::CloudFiles::Container - Represent a Cloud Files container

This class represents a container in Cloud Files. It is created by calling new_container or container on a Net::Mosso::CloudFiles object.

Returns the name of the container:

  say 'have container ' . $container->name;

Returns the total number of objects in the container:

  my $object_count = $container->object_count;

Returns the total number of bytes used by objects in the container:

  my $bytes_used = $container->bytes_used;

Returns a list of objects in the container as Net::Mosso::CloudFiles::Object objects. As the API only returns ten thousand objects per request, this module may have to do multiple requests to fetch all the objects in the container. This is exposed by using a Data::Stream::Bulk object. You can also pass in a prefix:

  foreach my $object ($container->objects->all) {
    ...
  }

  my @objects = $container->objects(prefix => 'dir/')->all;

This returns a <Net::Mosso::CloudFiles::Object> representing an object.

  my $xxx = $container->object( name => 'XXX' );
  my $yyy = $container->object( name => 'YYY', content_type => 'text/plain' );

Deletes the container, which should be empty:

  $container->delete;

Net::Mosso::CloudFiles, Net::Mosso::CloudFiles::Object.

Leon Brocard <acme@astray.com>.

Copyright (C) 2008-9, Leon Brocard

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
2010-07-03 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.