App Engine PHP SDK  v1 rev.445
The PHP runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google\appengine\ext\cloud_storage_streams\CloudStorageDirectoryClient Class Reference
Inheritance diagram for google\appengine\ext\cloud_storage_streams\CloudStorageDirectoryClient:
google\appengine\ext\cloud_storage_streams\CloudStorageClient

Public Member Functions

 __construct ($bucket_name, $object_name, $context)
 
 initialise ()
 
 dir_readdir ()
 
 dir_rewinddir ()
 
 close ()
 
 mkdir ($options)
 
 rmdir ($options)
 
- Public Member Functions inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
 __construct ($bucket, $object=null, $context=null)
 
 initialize ()
 
 dir_readdir ()
 
 dir_rewinddir ()
 
 close ()
 
 delete ()
 
 eof ()
 
 flush ()
 
 read ($count_bytes)
 
 seek ($offset, $whence)
 
 stat ()
 
 tell ()
 
 write ($data)
 
 getMetaData ()
 
 getContentType ()
 

Public Attributes

const MAX_KEYS = 1000
 
- Public Attributes inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
const METADATA_HEADER_PREFIX = 'x-goog-meta-'
 
const DEFAULT_READ_SIZE = 524288
 
const DEFAULT_READ_CACHE_EXPIRY_SECONDS = 3600
 
const DEFAULT_MAXIMUM_NUMBER_OF_RETRIES = 2
 
const DEFAULT_WRITABLE_CACHE_EXPIRY_SECONDS = 600
 
const READ_SCOPE = "https://www.googleapis.com/auth/devstorage.read_only"
 
const WRITE_SCOPE = "https://www.googleapis.com/auth/devstorage.read_write"
 
const FULL_SCOPE = "https://www.googleapis.com/auth/devstorage.full_control"
 
const OAUTH_TOKEN_FORMAT = "OAuth %s"
 
const PARTIAL_CONTENT_RANGE_FORMAT = "bytes %d-%d/*"
 
const FINAL_CONTENT_RANGE_FORMAT = "bytes %d-%d/%d"
 
const FINAL_CONTENT_RANGE_NO_DATA = "bytes */%d"
 
const DELIMITER = '/'
 
const FOLDER_SUFFIX = '_$folder$'
 
const WRITABLE_TEMP_FILENAME = "/_ah_is_writable_temp_file"
 
const S_IFREG = 0100000
 
const S_IFDIR = 0040000
 
const S_IRWXU = 00700
 
const S_IRUSR = 00400
 
const S_IWUSR = 00200
 
const S_IXUSR = 00100
 
const S_IRWXG = 00070
 
const S_IRGRP = 00040
 
const S_IWGRP = 00020
 
const S_IXGRP = 00010
 
const S_IRWXO = 00007
 
const S_IROTH = 00004
 
const S_IWOTH = 00002
 
const S_IXOTH = 00001
 
const CONTENT_RANGE_REGEX = "/bytes\s+(\d+)-(\d+)\/(\d+)/i"
 
const MEMCACHE_KEY_FORMAT = "_ah_gs_read_cache_%s_%s"
 
const WRITABLE_MEMCACHE_KEY_FORMAT = "_ah_gs_write_bucket_cache_%s"
 

Additional Inherited Members

- Static Public Member Functions inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
static createObjectUrl ($bucket, $object=null)
 
- Static Public Attributes inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
static POST
 
static enable_optimistic_cache
 
- Protected Member Functions inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
 getOAuthTokenHeader ($scopes)
 
 getRangeHeader ($start_byte, $end_byte)
 
 makeHttpRequest ($url, $method, $headers, $body=null)
 
 getHeaderValue ($header_name, $headers)
 
 createStatArray ($stat_args)
 
 tryParseCloudStorageErrorMessage ($gcs_result, &$code, &$message)
 
 getErrorMessage ($http_status_code, $http_result, $msg_prefix="Cloud Storage Error:")
 
- Static Protected Member Functions inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
static extractMetaData (array $headers)
 
- Protected Attributes inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
 $bucket_name
 
 $object_name
 
 $context_options = []
 
 $url
 
 $anonymous
 
- Static Protected Attributes inherited from google\appengine\ext\cloud_storage_streams\CloudStorageClient
static $METADATA_HEADERS
 
static $retry_error_codes
 
static $retry_exception_codes
 
static $valid_acl_values
 
static $upload_start_header = ["x-goog-resumable" => "start"]
 

Detailed Description

Client for deleting objects from Google Cloud Storage.

Member Function Documentation

google\appengine\ext\cloud_storage_streams\CloudStorageDirectoryClient::dir_readdir ( )

Read the next file in the directory list. If the list is empty and we believe that there are more results to read then fetch them

Returns
string The name of the next file in the directory, false if there are not more files.
google\appengine\ext\cloud_storage_streams\CloudStorageDirectoryClient::dir_rewinddir ( )

Rewind the directory handle to the first file that would have been returned from opendir().

Returns
bool true is successful, false otherwise.
google\appengine\ext\cloud_storage_streams\CloudStorageDirectoryClient::initialise ( )

Make the initial connection to GCS and fill the read buffer with files.

Returns
bool true if we can connect to the Cloud Storage bucket, false otherwise.
google\appengine\ext\cloud_storage_streams\CloudStorageDirectoryClient::mkdir (   $options)

Make a 'directory' in Google Cloud Storage.

Parameters
mixed$optionsA bitwise mask of values, such as STREAM_MKDIR_RECURSIVE.
Returns
bool true if the directory was created, false otherwise.

TODO: If the STREAM_MKDIR_RECURSIVE bit is not set in the options then we should validate that the entire path exists before we create the directory.

google\appengine\ext\cloud_storage_streams\CloudStorageDirectoryClient::rmdir (   $options)

Attempts to remove the directory . The directory must be empty. A E_WARNING level error will be generated on failure.

Parameters
mixed$optionsA bitwise mask of values, such as STREAM_MKDIR_RECURSIVE.
Returns
bool true if the directory was removed, false otherwise.

The documentation for this class was generated from the following file: