| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/storage/__pycache__/ |
Upload File : |
�
��� � �d � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm
Z
dd lmZ dd
lm
Z
ddlmZ ddlmZ dd
lmZ e j e j dd�� � e j e j e j j � � G d� de j � � � � � � � � � � ZdS )z&Command to list Cloud Storage objects.� )�absolute_import)�division)�unicode_literals)�storage_api)�storage_util)�base)�
exceptions)� expansion)�flags)�storage_parallel)�log)�
console_ioFzBThis command is deprecated. Use `gcloud alpha storage rm` instead.)�
is_removed�warningc �8 � e Zd ZdZddd�Zed� � � Zd� ZdS )�Deletez)Delete Cloud Storage objects and buckets.z� *{command}* lets you delete Cloud Storage objects and buckets. You can
specify one or more paths (including wildcards) and all matching objects
and buckets will be deleted.
a~ To delete an object, run:
$ *{command}* gs://mybucket/a.txt
To delete all objects in a directory, run:
$ *{command}* gs://mybucket/remote-dir/*
The above command will delete all objects under remote-dir/ but not its sub-directories.
To delete a directory and all its objects and subdirectories, run:
$ *{command}* --recursive gs://mybucket/remote-dir
$ *{command}* gs://mybucket/remote-dir/**
To delete all objects and subdirectories of a directory, without deleting the directory
itself, run:
$ *{command}* --recursive gs://mybucket/remote-dir/*
or
$ *{command}* gs://mybucket/remote-dir/**
To delete all objects and directories in a bucket without deleting the bucket itself, run:
$ *{command}* gs://mybucket/**
To delete all text files in a bucket or a directory, run:
$ *{command}* gs://mybucket/*.txt
$ *{command}* gs://mybucket/remote-dir/*.txt
To go beyond directory boundary and delete all text files in a bucket or a directory, run:
$ *{command}* gs://mybucket/**/*.txt
$ *{command}* gs://mybucket/remote-dir/**/*.txt
To delete a bucket, run:
$ *{command}* gs://mybucket
You can use wildcards in bucket names. To delete all buckets with prefix of `my`, run:
$ *{command}* --recursive gs://my*
)�DESCRIPTION�EXAMPLESc �� � | � ddd�� � | � ddd�� � | � d t d
dd�
� � t j | � � d S )N�path�+z}The path of objects and directories to delete. The path must begin with gs:// and may or may not contain wildcard characters.)�nargs�help�--recursive�
store_truezRRecursively delete the contents of any directories that match the path expression.)�actionr z
--num-threadsT� z,The number of threads to use for the delete.)�type�hidden�defaultr )�add_argument�intr �add_additional_headers_flag)�parsers �lib/surface/storage/delete.py�ArgszDelete.Args` s� � �
�����P� � Q� Q� Q�
�����$� � %� %� %�
����
���
;� � =� =� =�
�%�f�-�-�-�-�-� c � � t j |� � |j pdg}t j � � }|� |� � \ }}|r|j st j dd� � �g }g }|D ]\}t j
� |d�� � } | j s|�
| j � � |�
|dz � � �]|� |� � \ }
}|� |
� � g }t! |� � D ]F}
|�
t# j t j
� |
� � � � � � �G|rOt'