ó FRTc@s¦ddlZddlZddlZddlZddlmZddlmZddlmZde fd„ƒYZ de fd„ƒYZ d e fd „ƒYZ dS( i’’’’N(t DeleteMarker(tBotoClientError(tInvalidUriErrort StorageUric Bs@eZdZdZdZiZd„Zd„Zd„Z d„Z d„Z d„Z d„Z ddd„Zd „Zedddd „Zd d ded „Zeddd „Zedd„Zeddd„Zedd„Zddd„Zdddeddddd„Zedddedd„Zd„Zd„ZRS(sę Base class for representing storage provider-independent bucket and object name with a shorthand URI-like syntax. This is an abstract class: the constructor cannot be called (throws an exception if you try). cCstdƒ‚dS(sBUncallable constructor on abstract base StorageUri class. s0Attempt to instantiate abstract StorageUri classN(R(tself((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt__init__6scCs|jS(s%Returns string representation of URI.(turi(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt__repr__<scCs|j|jkS(s#Returns true if two URIs are equal.(R(RR((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytequals@scCs>|dkr:tdjtjd||fdƒƒƒ‚ndS(Ns sÉAttempt to get %s for "%s" failed. This can happen if the URI refers to a non-existent object or if you meant to operate on a directory (e.g., leaving off -R option on gsutil cp, mv, or ls of a bucket)iP(tNoneRtjointtextwraptwrap(RtresptlevelR((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytcheck_responseDs cCs?tt|ƒtƒr;|j r;td||jfƒ‚ndS(Ns%s on bucket-less URI (%s)(t issubclassttypetBucketStorageUrit bucket_nameRR(Rt function_name((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt_check_bucket_uriLscCs?tt|ƒtƒr;|j r;td||jfƒ‚ndS(Ns%s on object-less URI (%s)(RRRt object_nameRR(RR((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt_check_object_uriQscKsIxB|D]:}||rtjjd||t||ƒfƒqqWdS(Ns$Warning: %s ignores argument: %s=%s (tsyststderrtwritetstr(RRtargstarg((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt_warn_about_argsVs    c KsŒt|jpd ƒ}t|dƒr@d|kr@|j|d} @return: A connection to storage service provider of the given URI. tsuppress_consec_slashests3i’’’’(t S3Connectiontgs(t GSConnection(tOrdinaryCallingFormattcalling_formattfile(tFileConnectionsUnrecognized scheme "%s"((tdicttconnection_argsthasattrRtupdatet connectiontschemet provider_pooltboto.s3.connectionR!tboto.gs.connectionR#R$tboto.file.connectionR'Rtdebug( Rt access_key_idtsecret_access_keytkwargsR)R!R#R$R'((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytconnect]s:       cCs1tt|ƒtƒo0|jdk p0|jdk S(N(RRRt version_idR t generation(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt has_version—scCs8|jdƒ|j||ƒ}|j|j|||ƒS(Nt delete_key(Rt get_bucketR:R(RtvalidatetheadersR7t mfa_tokentbucket((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR:œs tcCsk|jdƒ|jd|ƒ}|rKd„|jd|d|d|ƒDƒS|jd|d|d|ƒSdS(Nt list_bucketR=css$|]}t|tƒs|VqdS(N(t isinstanceR(t.0tv((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pys Østprefixt delimiter(RR;t list_versionstlist(RRERFR=t all_versionsR?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRA£s cCs|j||ƒ}|j|ƒS(N(R;t get_all_keys(RR<R=RER?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRJÆscCsK|jdƒ|jƒ}|j|j||ƒ}|j|d|jƒ|S(NR;R?(RR6R;RRR(RR<R=tconnR?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR;³s   cCsQ|jdƒ|j||ƒ}|j|j||ƒ}|j|d|jƒ|S(Ntget_keytkey(RR;RLRRR(RR<R=R7R?RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRLŗs  cCs/|jdƒ|j||ƒ}|j|jƒS(Ntnew_key(RR;RNR(RR<R=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRNĮs cCs^|jdƒ|jddtƒ|jd|ƒ}|j|d|jƒ|j||d|ƒS(NRLR<RMR7(RRtFalseRLR RRtget_contents_to_file(RtfpR=R7RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytget_contents_to_streamĘs  i c CsŒ|jdƒ|jd|ƒ} |j| d|jƒ| rf| j||||||||d| ƒn"| j||||||||ƒdS(NRPRMt hash_algs(RRLR RRRP( RRQR=tcbtnum_cbttorrentR7tres_download_handlertresponse_headersRSRM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRPĶs  cCsN|jdƒ|j||ƒ}|j|d|jƒ|j|||||ƒS(Ntget_contents_as_stringRM(RRLRRRY(RR<R=RTRURVR7RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRYŽs  cCs2|jƒ}|jj}|j|d|jƒ|S(Nt acl_class(R6tproviderRZRR(RRKRZ((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRZęs  cCs2|jƒ}|jj}|j|d|jƒ|S(Nt canned_acls(R6R[R\RR(RRKR\((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR\ģs  N(t__name__t __module__t__doc__R R,R)R.RRRRRRRR6R9ROR:RARJR;RLRNRRRPRYRZR\(((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR s<       :         Rc Bs˜eZdZdZegƒZd>d>dd>ed>d>ed„Z d„Z d„Z d„Z ed>d>d„Z ed>d>d>d„Zd „Zd „Zed>d>d „Zed>d „Zed>d „Zed>d„Zed>d„Zed>d„Zed>d>d„Zeed>d„Zeed>d„Zeed>d„Zd>d„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%d>d d>d>d!„Z&d>d"„Z'd>d#„Z(d$„Z)d ed>d>d>d>d%„Z*d ed>d>d>d>d&„Z+ed>d'„Z,ed>d>d(„Z-ed>d>d)„Z.ed>d>d*„Z/ed>d>d+„Z0d>ed>d,d>d>ed-„Z1d>ed>d,d>d>d>ed>d.„ Z2d>ed>d>ed/„Z3d>d>d0eed>d>d>d1„Z4d>ed>d>d2„Z5ed>d>d3„Z6ed>d>d4„Z7d>d>ed>d5„Z8ed>d6„Z9d>d7„Z:d>d8„Z;d>d9„Z<d>d>d:„Z=ed>d;„Z>ed>d<„Z?d>d=„Z@RS(?s StorageUri subclass that handles bucket storage providers. Callers should instantiate this class by calling boto.storage_uri(). t/ic Cs’||_||_||_||_|r6||_n||_||_|oWt|ƒ|_| |_ t |jƒp~t |ƒ|_ |j ƒdS(sŠInstantiate a BucketStorageUri from scheme,bucket,object tuple. @type scheme: string @param scheme: URI scheme naming the storage provider (gs, s3, etc.) @type bucket_name: string @param bucket_name: bucket name @type object_name: string @param object_name: object name, excluding generation/version. @type debug: int @param debug: debug level to pass in to connection (range 0..2) @type connection_args: map @param connection_args: optional map containing args to be passed to {S3,GS}Connection constructor (e.g., to override https_connection_factory). @param suppress_consec_slashes: If provided, controls whether consecutive slashes will be suppressed in key paths. @param version_id: Object version id (S3-specific). @param generation: Object generation number (GCS-specific). @param is_latest: boolean indicating that a versioned object is the current version After instantiation the components are available in the following fields: scheme, bucket_name, object_name, version_id, generation, is_latest, versionless_uri, version_specific_uri, uri. Note: If instantiated without version info, the string representation for a URI stays versionless; similarly, if instantiated with version info, the string representation for a URI stays version-specific. If you call one of the uri.set_contents_from_xyz() methods, a specific object version will be created, and its version-specific URI string can be retrieved from version_specific_uri even if the URI was instantiated without version info. N( R-RRR2R)RR7tintR8t is_latesttbooltis_version_specifict_build_uri_strings( RR-RRR2R)RR7R8Rb((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRüs$        cCsŪ|jr¢|jr¢d|j|j|jf|_|jrVd|j|jf|_n%|jr{d|j|jf|_n|jr“|j|_q×|j|_n5|jrĒd|j|jf|_nd|j|_dS(Ns %s://%s/%ss%s#%ss%s://%s/s%s://( RRR-tversionless_uriR8tversion_specific_uriR7RdR(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRe-s     cCsJ|jt|ddƒt|ddƒt|ddƒt|ddƒƒdS(NR7R8Rbtmd5(t_update_from_valuestgetattrR (RRM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt_update_from_key@s cCs2||_||_||_|jƒ||_dS(N(R7R8RbReRh(RR7R8RbRh((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRiGs     cCs«|jdƒ|j||ƒ}|jƒjdkr[|j|j|d|pR|jƒ}n6|jƒjdkr‘|j|j|d|jƒ}n|j|d|j ƒ|S(NRLtawsR7tgoogleR8RM( RR;t get_providertnameRLRR7R8RR(RR<R=R7R?RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRLNs cCs‘|jdƒ|j||ƒ}|jƒjdkr\|p@|j}|j|j|||ƒS|jƒjdkr|j|j|d|jƒSdS(NR:RlRmR8(RR;RnRoR7R:RR8(RR<R=R7R>R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR:Zs c Cs;|jdƒt|jd|jd|d|jd|jƒS(sŗInstantiate a BucketStorageUri from the current BucketStorageUri, but replacing the object_name. @type new_name: string @param new_name: new object name tclone_replace_nameRRR2R(RRR-RR2R(Rtnew_name((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRpfs   cCs¼|jdƒd }d }t}t|dƒr:|j}nt|dƒrU|j}nt|dƒrp|j}nt|jj ƒd|j j d|j d|j d|j d|d|d|ƒS( s)Instantiate a BucketStorageUri from the current BucketStorageUri, by replacing the object name with the object name and other metadata found in the given Key object (including generation). @type key: Key @param key: key for the new StorageUri to represent tclone_replace_keyR7R8RbRRR2RN(RR ROR*R7R8RbRR[tget_provider_nameR?RoR2R(RRMR7R8Rb((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRrss&        cCsŸ|jdƒ|j||ƒ}|jp+d}|jƒjdkrj|pO|j}|j|||ƒ}n|j||d|jƒ}|j|d|j ƒ|S(sreturns a bucket's acltget_aclR@RlR8tacl( RR;RRnRoR7RtR8RR(RR<R=R7R?tkey_nameRu((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRts cCsH|jdƒ|j||ƒ}|j|ƒ}|j|d|jƒ|S(s%returns a bucket's default object aclt get_def_aclRu(RR;RwRR(RR<R=R?Ru((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRwŸs  cCsH|jdƒ|j||ƒ}|j|ƒ}|j|d|jƒ|S(sreturns a bucket's CORS XMLtget_corstcors(RR;RxRR(RR<R=R?Ry((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRx§s  cCs9|jdƒ|j||ƒ}|j|jƒ|ƒdS(s#sets or updates a bucket's CORS XMLs set_cors N(RR;tset_corstto_xml(RRyR<R=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRzÆs cCs)|jdƒ|j||ƒ}|jƒS(Nt get_location(RR;R|(RR<R=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR|µs cCsN|jdƒ|jdkr2td|jƒ‚n|j||ƒ}|jƒS(Ntget_storage_classR"s.get_storage_class() not supported for %s URIs.(RR-t ValueErrorR;R}(RR<R=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR}ŗs  cCs8|jdƒ|j||ƒ}|j||j||ƒS(Ntget_subresource(RR;RR(Rt subresourceR<R=R7R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRÄs cCsŁ|jdƒ|jdkr2td|jƒ‚n|jrŽ|rPtdƒ‚n|j||ƒ}|j|d|jƒ|j|||ƒnG|jrĀ|j ||ƒ}|j||||ƒnt d|jƒ‚dS(Ntadd_group_email_grantR"s2add_group_email_grant() not supported for %s URIs.sDadd_group_email_grant() on key-ful URI cannot specify recursive=TrueRMs-add_group_email_grant() on bucket-less URI %s( RR-R~RRLRRRRR;R(Rt permissiont email_addresst recursiveR<R=RMR?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRĖs     cCs}|jdƒ|jsA|j||ƒ}|j||||ƒn8|j||ƒ}|j|d|jƒ|j||ƒdS(Ntadd_email_grantRM(RRR;R…RLRR(RR‚RƒR„R<R=R?RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR…ąs   cCs}|jdƒ|jsA|j||ƒ}|j||||ƒn8|j||ƒ}|j|d|jƒ|j||ƒdS(Ntadd_user_grantRM(RRR;R†RLRR(RR‚tuser_idR„R<R=R?RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR†ģs  cCs)|jdƒ|j|ƒ}|j|ƒS(Ns list_grants (RR;t list_grants(RR=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRˆ÷s cCstS(s3Returns True if this URI names a file or directory.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt is_file_uriüscCstS(s2Returns True if this URI names a bucket or object.(tTrue(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt is_cloud_uriscCst|j ƒS(sŅ Returns True if this URI names a directory or bucket. Will return False for bucket subdirs; providing bucket subdir semantics needs to be done by the caller (like gsutil does). (RcR(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytnames_containerscCs t|jƒS(s0Returns True if this URI names a file or object.(RcR(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytnames_singleton scCstS(s+Returns True if this URI names a directory.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytnames_directoryscCst|j ƒS(s*Returns True if this URI names a provider.(RcR(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytnames_providerscCst|jƒot|j ƒS(s(Returns True if this URI names a bucket.(RcRR(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt names_bucketscCstS(s&Returns True if this URI names a file.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt names_filescCs |jƒS(s)Returns True if this URI names an object.(R(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt names_object scCstS(s8Returns True if this URI represents input/output stream.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt is_stream$sR@cCsa|jdƒ|jƒ}|jdkrD|j|j||||ƒS|j|j|||ƒSdS(Nscreate_bucket R"(RR6R-t create_bucketR(RR=tlocationtpolicyt storage_classRK((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR”(s   cCs,|jdƒ|jƒ}|j|j|ƒS(Nt delete_bucket(RR6R˜R(RR=RK((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR˜4s  cCs|jƒ}|j|ƒS(N(R6tget_all_buckets(RR=RK((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR™9s cCs/|jƒ}|j}|j|d|jƒ|S(NR[(R6R[RR(RRKR[((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRn=s  c Cs‘|jdƒ|p|jpd}|j||ƒ}|jrh|j|||d|jd|d|ƒn%|pt|j}|j||||ƒdS(sSets or updates a bucket's ACL.tset_aclR@R8t if_generationtif_metagenerationN(RRR;R8RšR7( Rt acl_or_strRvR<R=R7R›RœR?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRšCs  c Cs”|jdƒ|p|jpd}|j||ƒ}|jrh|j|||d|jd|d|ƒn(|pt|j}|j|||d|ƒdS(s2Sets or updates a bucket's ACL with an XML string.t set_xml_aclR@R8R›RœR7N(RRR;R8RžR7( Rt xmlstringRvR<R=R7R›RœR?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRžQs  cCs-|jdƒ|j||ƒj||ƒdS(sASets or updates a bucket's default object ACL with an XML string.tset_def_xml_aclN(RR;R (RRŸR<R=((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR `s cCs-|jdƒ|j||ƒj||ƒdS(s.Sets or updates a bucket's default object ACL.t set_def_aclN(RR;R”(RRR<R=R7((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR”es cCs\|jdƒ|jdd|ƒ|j||ƒ}|j|d|jƒ|j||ƒdS(s>Sets or updates a bucket's acl to a predefined (canned) value.tset_canned_aclR7RMN(RRRLRRR¢(Rtacl_strR<R=R7RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR¢ks  cCsL|jdƒ|j||ƒ}|j|d|jƒ|j|||ƒdS(sXSets or updates a bucket's default object acl to a predefined (canned) value.sset_def_canned_acl RMN(RRLRRtset_def_canned_acl(RR£R<R=R7RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR¤ts cCs?|jdƒ|j||ƒ}|j|||j||ƒdS(Ntset_subresource(RR;R„R(RR€tvalueR<R=R7R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR„}s i c Cs |jdƒ|jd|ƒ} |jdkrk|rGtjjdƒn| j|||||||ƒ} n$| j||||||||ƒ} |j| ƒ| S(Ntset_contents_from_stringR=R"s^Warning: GCS does not support reduced_redundancy; argument ignored by set_contents_from_string(RRNR-RRRR§Rk( RtsR=treplaceRTRUR–Rhtreduced_redundancyRMtresult((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR§„s   c Cs×|jdƒ|jd|ƒ} |jdkr†| j|||||||d|d| d| ƒ} | rĘ|jd| jd|ƒqĘn@|jdd| ƒ| j|||||||d|d| ƒ} |j| ƒ| S(Ntset_contents_from_fileR=R"tsizetrewindtres_upload_handler( RRNR-R¬RiR R8RRk( RRQR=R©RTRUR–RhR­R®RÆRMR«((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR¬—s     c CsT|jdƒ|jt|ƒ}|j||||d|d|ƒ}|j|ƒ|S(Ntset_contents_from_streamR–RŖ(RRNROR°Rk( RRQR=R©RTR–RŖtdst_keyR«((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR°¬s   tSTANDARDc CsĮ|jdƒ|jdtd|ƒ} | rt| jd|jd|d|d|d|d |d |d|d | d | ƒ S| jd|jd|d|d|d |d|d |d |d|d | ƒ SdS(sReturns newly created key.tcopy_keyR<R=t new_key_nametsrc_bucket_namet src_key_nametmetadataR—t preserve_aclt encrypt_keyt query_argstsrc_generationtsrc_version_idN(RR;ROR³R( RRµR¶R·R¼R—RøR¹R=RŗR»t dst_bucket((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR³¶s           cCs9|jdƒ|j||ƒ}|j||d|ƒdS(Ntenable_loggingR=(RR;R¾(Rt target_buckett target_prefixR<R=R7R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR¾Ķs cCs3|jdƒ|j||ƒ}|jd|ƒdS(Ntdisable_loggingR=(RR;RĮ(RR<R=R7R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRĮÓs cCs/|jdƒ|j||ƒ}|jd|ƒS(Ntget_logging_configR=(RR;RĀ(RR<R=R7R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRĀŲs cCsR|jdƒ|j||ƒ}|p(|s;|j|ƒn|j|||ƒdS(Ntset_website_config(RR;tdelete_website_configurationtconfigure_website(Rtmain_page_suffixt error_keyR<R=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRĆŻs   cCs,|jdƒ|j||ƒ}|j|ƒS(Ntget_website_config(RR;tget_website_configuration(RR<R=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRČęs cCs,|jdƒ|jt|ƒ}|j|ƒS(Ntget_versioning_config(RR;ROtget_versioning_status(RR=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRŹės cCs/|jdƒ|jt|ƒ}|j||ƒS(Ntconfigure_versioning(RR;RORĢ(RtenabledR=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRĢšs cCs"|jtƒj|||d|ƒS(NR=(RLROtset_remote_metadata(Rt metadata_plustmetadata_minusRøR=((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyt set_metadataõscCsy|jdƒg}x1|D])}|j|jƒƒ|j|d_qW|jƒj|d|d|ƒ|_|jƒ|S(Ntcomposei’’’’t content_typeR=(RtappendRNR8RŅRe(Rt componentsRÓR=tcomponent_keystsuri((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRŅüs    cCsH|jdƒ|j||ƒ}|j|ƒ}|j|d|jƒ|S(s+Returns a bucket's lifecycle configuration.tget_lifecycle_configt lifecycle(RR;RŲRR(RR<R=R?tlifecycle_config((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRŲs  cCs3|jdƒ|j||ƒ}|j||ƒdS(s3Sets or updates a bucket's lifecycle configuration.tconfigure_lifecycleN(RR;RŪ(RRŚR<R=R?((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRŪs cCsM|jstd|jƒ‚n|jƒ}|j|jd|ƒ}t|ƒS(s8Returns True if the object exists or False if it doesn'tsexists on object-less URI (%s)R=(RRRR;RLRc(RR=R?RM((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pytexistss   N(AR]R^R_tdelimtsett capabilitiesR RŠRORReRkRiRLR:RpRrRtRwRxRzR|R}RRR…R†RˆR‰R‹RŒRRŽRRR‘R’R“R”R˜R™RnRšRžR R”R¢R¤R„R§R¬R°R³R¾RĮRĀRĆRČRŹRĢRŃRŅRŲRŪRÜ(((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRósØ  /                                         tFileStorageUricBs›eZdZejZed„Zd„Zd„Z d„Z d„Z d„Z d„Z d„Zd „Zd „Zd „Zd „Zd „Zdd„ZRS(sć StorageUri subclass that handles files in the local file system. Callers should instantiate this class by calling boto.storage_uri(). See file/README about how we map StorageUri operations onto a file system. cCs>d|_d|_||_d||_||_||_dS(s™Instantiate a FileStorageUri from a path name. @type object_name: string @param object_name: object name @type debug: boolean @param debug: whether to enable debugging on this StorageUri After instantiation the components are available in the following fields: uri, scheme, bucket_name (always blank for this "anonymous" bucket), object_name. R&R@sfile://N(R-RRRR2tstream(RRR2R“((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR)s     cCst||j|jƒS(s¶Instantiate a FileStorageUri from the current FileStorageUri, but replacing the object_name. @type new_name: string @param new_name: new object name (RąR2Rį(RRq((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRp=scCstS(s3Returns True if this URI names a file or directory.(RŠ(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR‰FscCstS(s2Returns True if this URI names a bucket or object.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR‹JscCs |jƒS(s5Returns True if this URI names a directory or bucket.(RŽ(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRŒNscCs |jƒ S(s<Returns True if this URI names a file (or stream) or object.(RŒ(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRRscCs |jr tStjj|jƒS(s+Returns True if this URI names a directory.(RįROtostpathtisdirR(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRŽVs cCstS(s*Returns True if this URI names a provider.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR\scCstS(s(Returns True if this URI names a bucket.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR`scCs |jƒS(s&Returns True if this URI names a file.(R(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR‘dscCstS(s)Returns True if this URI names an object.(RO(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR’hscCs t|jƒS(sAReturns True if this URI represents input/output stream. (RcRį(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyR“lscCs|jƒjƒdS(s$Closes the underlying file. N(RLtclose(R((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRåqscCstjj|jƒS(s6Returns True if the file exists or False if it doesn't(RāRćRÜR(Rt_headers_not_used((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRÜvsN(R]R^R_RātsepRŻRORRpR‰R‹RŒRRŽRRR‘R’R“RåR RÜ(((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyRąs              ( tbotoRāRR tboto.s3.deletemarkerRtboto.exceptionRRtobjectRRRą(((s=/opt/freeware/lib/python2.7/site-packages/boto/storage_uri.pyts    Ó’’.