API Documentation

\google\appengine\ext\cloud_storage_streams\CloudStorageStreamWrapper

FINAL

A user space stream wrapper for reading and writing to Google Cloud Storage.

See: http://www.php.net/manual/en/class.streamwrapper.php

Allowed stream_context options. "anonymous": Boolean, if set then OAuth tokens will not be generated. "acl": The ACL to apply when creating an object. "Content-Type": The content type of the object being written.

Constants

STREAM_OPEN_FOR_INCLUDE

Properties

$context

$context :

Type

Methods

__construct

__construct()

Constructs a new stream wrapper.

__destruct

__destruct()

Destructs an existing stream wrapper.

dir_closedir

dir_closedir()

Close an open directory handle.

dir_opendir

dir_opendir( $path, $options)

Open a directory handle.

Parameters

Name Description

$path

$options

dir_readdir

dir_readdir() : string

Read entry from the directory handle.

Returns

string

representing the next filename, of false if there is no next file.

dir_rewinddir

dir_rewinddir() : boolean

Reset the output returned from dir_readdir.

Returns

boolean

true if the stream can be rewound, false otherwise.

mkdir

mkdir( $path, $mode, $options)

Parameters

Name Description

$path

$mode

$options

rmdir

rmdir( $path, $options)

Parameters

Name Description

$path

$options

rename

rename( $from, $to) : TRUE

Rename a cloud storage object.

Parameters

Name Description

$from

$to

Returns

TRUE

if the object was renamed, FALSE otherwise

stream_cast

stream_cast()

Retrieve the underlaying resource of the stream, called in response to stream_select().

As GS streams have no underlying resource, we can only return false

stream_close

stream_close()

All resources that were locked, or allocated, by the wrapper should be released.

No value is returned.

stream_eof

stream_eof() : TRUE

Tests for end-of-file on a file pointer.

Returns

TRUE

if the read/write position is at the end of the stream and if no more data is available to be read, or FALSE otherwise

stream_flush

stream_flush() : TRUE

Flushes the output.

Returns

TRUE

if the cached data was successfully stored (or if there was no data to store), or FALSE if the data could not be stored.

stream_metadata

stream_metadata( $path, $option, $value)

Parameters

Name Description

$path

$option

$value

stream_lock

stream_lock( $operation)

Parameters

Name Description

$operation

stream_open

stream_open( $path, $mode, $options, $opened_path)

Parameters

Name Description

$path

$mode

$options

$opened_path

stream_read

stream_read( $count)

Read from a stream, return string of bytes.

Parameters

Name Description

$count

stream_seek

stream_seek( $offset, $whence)

Parameters

Name Description

$offset

$whence

stream_set_option

stream_set_option( $option, $arg1, $arg2)

Parameters

Name Description

$option

$arg1

$arg2

stream_stat

stream_stat()

stream_tell

stream_tell()

stream_write

stream_write( $data)

Return the number of bytes written.

Parameters

Name Description

$data

url_stat

url_stat( $path, $flags)

Parameters

Name Description

$path

$flags

getMetaData

getMetaData()

getContentType

getContentType()

Send feedback about...

App Engine standard environment for PHP