File: //lib/python3/dist-packages/boto/file/__pycache__/bucket.cpython-312.pyc
�
ckF[� � �F � d dl Z d dlmZ d dlmZ d dlmZ G d� de� Zy)� N)�Key)�SimpleResultSet)�BucketListResultSetc �t � e Zd Zd� Zd� Zd� Z d d�Zd
d�Zddej fd�Z
dej fd�Zy)�Bucketc � � || _ || _ y)zHInstantiate an anonymous file-based Bucket around a single key.
N)�name�
contained_key)�selfr r
s �2/usr/lib/python3/dist-packages/boto/file/bucket.py�__init__zBucket.__init__ s � � �� �*��� c �* � t t | � � S �N)�iterr �r s r �__iter__zBucket.__iter__% s � ��'��-�.�.r c � � d| j z S )Nzanonymous bucket for file://)r
r s r �__str__zBucket.__str__( s � �-��0B�0B�B�Br Nc �. � t j |� y)a<
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)�os�remove)r �key_name�headers�
version_id� mfa_tokens r �
delete_keyzBucket.delete_key+ s � � � � �(�r c �Z � t | j | j � }t |g� S )z�
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
)r r r
r )r r �params�keys r �get_all_keyszBucket.get_all_keys; s'