ó FRTc@sVddlZddlmZddlmZddlmZdefd„ƒYZdS(iÿÿÿÿN(tKey(tSimpleResultSet(tBucketListResultSettBucketcBsheZd„Zd„Zd„Zdddd„Zdd„Zddej d„Z dej d„Z RS(cCs||_||_dS(sHInstantiate an anonymous file-based Bucket around a single key. N(tnamet contained_key(tselfRR((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pyt__init__s cCstt|ƒƒS(N(titerR(R((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pyt__iter__%scCs d|jS(Nsanonymous bucket for file://(R(R((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pyt__str__(scCstj|ƒdS(s< Deletes a key from the bucket. :type key_name: string :param key_name: The key name to delete :type version_id: string :param version_id: Unused in this subclass. :type mfa_token: tuple or list of strings :param mfa_token: Unused in this subclass. N(tostremove(Rtkey_nametheaderst version_idt mfa_token((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pyt delete_key+scKs"t|j|jƒ}t|gƒS(sÛ This method returns the single key around which this anonymous Bucket was instantiated. :rtype: SimpleResultSet :return: The result from file system listing the keys requested (RRRR(RRtparamstkey((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pyt get_all_keys;s cCsK|dkr%t|jddtjƒSt|dƒ}t|j||ƒSdS(s Check to see if a particular key exists within the bucket. Returns: An instance of a Key object or None :type key_name: string :param key_name: The name of the key to retrieve :type version_id: string :param version_id: Unused in this subclass. :type stream_type: integer :param stream_type: Type of the Key - Regular File or input/output Stream :rtype: :class:`boto.file.key.Key` :returns: A Key object from this bucket. t-tkey_typetrbN(RRtKEY_STREAM_READABLEtopen(RR RRRtfp((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pytget_keyGs cCs†|dkr%t|jddtjƒStjj|ƒ}|r`tjj|ƒ r`tj|ƒnt|dƒ}t|j||ƒSdS(sä Creates a new key :type key_name: string :param key_name: The name of the key to create :rtype: :class:`boto.file.key.Key` :returns: An instance of the newly created key object RRtwbN( RRtKEY_STREAM_WRITABLER tpathtdirnametexiststmakedirsR(RR Rtdir_nameR((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pytnew_key_s N( t__name__t __module__RR R tNoneRRRtKEY_REGULAR_FILERR#(((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pyRs    ( R t boto.file.keyRtboto.file.simpleresultsetRtboto.s3.bucketlistresultsetRtobjectR(((s=/opt/freeware/lib/python2.7/site-packages/boto/file/bucket.pyts