Пример #1
0
 /**
  * list files in a container starting from the url
  * @param type $url
  * @return boolean
  */
 public function viewBlobs($url)
 {
     try {
         $dir = $this->getContainer($url);
     } catch (Exception $ex) {
         echo $ex->getMessage();
     }
     try {
         return parent::listContainer($dir);
     } catch (ServiceException $e) {
         // Handle exception based on error codes and messages.
         // Error codes and messages are here:
         // http://msdn.microsoft.com/it-it/library/windowsazure/dd179439.aspx
         $code = $e->getCode();
         $error_message = $e->getMessage();
         echo $code . ": " . $error_message . "<br />";
         return false;
     }
 }
Пример #2
0
 /**
  * create a container
  * @param type $dir name of container
  * @param type $access can be cb(CONTAINER_AND_BLOBS) or b (BLOBS_ONLY)
  * CONTAINER_AND_BLOBS:     
  * Specifies full public read access for container and blob data.
  * proxys can enumerate blobs within the container via anonymous 
  * request, but cannot enumerate containers within the storage account.
  *
  * BLOBS_ONLY:
  * Specifies public read access for blobs. Blob data within this 
  * container can be read via anonymous request, but container data is not 
  * available. proxys cannot enumerate blobs within the container via 
  * anonymous request.
  * If this value is not specified in the request, container data is 
  * private to the account owner.
  * @return boolean
  */
 public function mkdir($dir, $access = 'cb', array $metadata = array())
 {
     return parent::createContainer($dir, $access, $metadata);
 }