
                         |   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 dZ
d	Zd
Zej                   ej                  ej                  j                          G d dej"                                      Zej                   ej                  ej                  j&                         G d de                    Zy)zCImplementation of Unix-like cp command for cloud storage providers.    )absolute_import)division)unicode_literals)base)cp_command_util)flagszp
Copy data between your local file system and the cloud, within the cloud,
and between cloud storage providers.
a  
The following command uploads all text files from the local directory to a
bucket:

  $ {command} *.txt gs://my-bucket

The following command downloads all text files from a bucket to your
current directory:

  $ {command} gs://my-bucket/*.txt .

The following command transfers all text files from a bucket to a
different cloud storage provider:

  $ {command} gs://my-bucket/*.txt s3://my-bucket

Use the `--recursive` option to copy an entire directory tree. The
following command uploads the directory tree ``dir'':

  $ {command} --recursive dir gs://my-bucket

Recursive listings are similar to adding `**` to a query, except
`**` matches only cloud objects and will not match prefixes. For
example, the following would not match ``gs://my-bucket/dir/log.txt''

  $ {command} gs://my-bucket/**/dir dir

`**` retrieves a flat list of objects in a single API call. However, `**`
matches folders for non-cloud queries. For example, a folder ``dir''
would be copied in the following.

  $ {command} ~/Downloads/**/dir gs://my-bucket

c                   0    e Zd ZdZeedZed        Zd Z	y)Cp1Upload, download, and copy Cloud Storage objects.DESCRIPTIONEXAMPLESc                     t        j                  || j                                t        j                  |       t	        j
                  |       y N)r   add_cp_and_mv_flagsReleaseTrackadd_recursion_flagr   add_per_object_retention_flags)clsparsers     lib/surface/storage/cp.pyArgszCp.ArgsL   s7    ''0@0@0BC&&v.	((0    c                 8    t        j                  |      | _        y r   )r   run_cp	exit_code)selfargss     r   RunzCp.RunR   s    $++D1DNr   N)
__name__
__module____qualname____doc___COMMAND_DESCRIPTION_GA_EXAMPLESdetailed_helpclassmethodr   r     r   r   r   r   B   s/     : *-
 1 1
2r   r   c                        e Zd ZdZeeez   dZy)CpAlphar   r   N)r!   r"   r#   r$   r%   r&   _ALPHA_EXAMPLESr'   r)   r   r   r+   r+   W   s     : *0-r   r+   N)r$   
__future__r   r   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.storager   r   r%   r&   r,   UniverseCompatibleReleaseTracksr   GACommandr   ALPHAr+   r)   r   r   <module>r5      s    J &  ' ( > 4  B D%%(()2 2 * 2& D%%++,b  - r   