public function stream_close() {

    try {
      $this->writeRemote();
    }
    catch (\HPCloud\Exception $e) {
      trigger_error('Error while closing: ' . $e->getMessage(), E_USER_NOTICE);
      return FALSE;
    }

    // Force-clear the memory hogs.
    unset($this->obj);
    fclose($this->objStream);
  }
public function stream_close() {

    try {
      $this->writeRemote();
    }
    catch (\HPCloud\Exception $e) {
      trigger_error('Error while closing: ' . $e->getMessage(), E_USER_NOTICE);
      return FALSE;
    }

    // Force-clear the memory hogs.
    unset($this->obj);
    fclose($this->objStream);
  }
public function stream_close ( ) { try { $ this -> writeRemote ( ) ; } catch ( \ HPCloud \ Exception $ e ) { trigger_error ( 'Error while closing: ' . $ e -> getMessage ( ) , E_USER_NOTICE ) ; return FALSE ; } // Force-clear the memory hogs. unset ( $ this -> obj ) ; fclose ( $ this -> objStream ) ; }
Close a stream, writing if necessary.

@code
<?php

// Assuming $cxt has a valid context.

$file = fopen('swift://container/file.txt', 'r', FALSE, $cxt);

fclose($file);

?>
@endcode

This will close the present stream. Importantly,
this will also write to the remote object storage if
any changes have been made locally.

See stream_open().
Close a stream writing if necessary .