OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
gslib
/
utils
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:48 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
126 bytes
02/11/2025 08:19:48 AM
rw-r--r--
📄
acl_helper.cpython-39.pyc
9.38 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
arg_helper.cpython-39.pyc
1.01 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
boto_util.cpython-39.pyc
16.46 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
cat_helper.cpython-39.pyc
4.21 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
cloud_api_helper.cpython-39.pyc
3.29 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
constants.cpython-39.pyc
2.88 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
copy_helper.cpython-39.pyc
101.64 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
encryption_helper.cpython-39.pyc
5.84 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
execution_util.cpython-39.pyc
1.06 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hashing_helper.cpython-39.pyc
15.71 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
iam_helper.cpython-39.pyc
8.61 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
ls_helper.cpython-39.pyc
12.4 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
metadata_util.cpython-39.pyc
3.1 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
parallelism_framework_util.cpython-39.pyc
11.79 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
posix_util.cpython-39.pyc
12.46 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
retention_util.cpython-39.pyc
8.77 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
retry_util.cpython-39.pyc
2.5 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
rsync_util.cpython-39.pyc
1.6 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
shim_util.cpython-39.pyc
19.8 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
signurl_helper.cpython-39.pyc
4.21 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
stet_util.cpython-39.pyc
3.35 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
system_util.cpython-39.pyc
7.9 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
temporary_file_util.cpython-39.pyc
915 bytes
02/11/2025 08:19:49 AM
rw-r--r--
📄
text_util.cpython-39.pyc
12.62 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
translation_helper.cpython-39.pyc
25.67 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
unit_util.cpython-39.pyc
7.01 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
update_util.cpython-39.pyc
3.39 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
user_agent_helper.cpython-39.pyc
1.49 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
version_check.cpython-39.pyc
1.39 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
wrapped_credentials.cpython-39.pyc
5.81 KB
02/11/2025 08:19:49 AM
rw-r--r--
Editing: cat_helper.cpython-39.pyc
Close
a +(Wg� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlZddlm Z ddl mZ dd lm Z dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ g d�ZG dd� de�ZdS )z)Helper for cat and cp streaming download.� )�absolute_import)�print_function)�division)�unicode_literalsN)�config)�EncryptionException)�CommandException)�NO_URLS_MATCHED_TARGET)�StorageUrlFromString)�CryptoKeyWrapperFromKey)�FindMatchingCSEKInBotoConfig)�ObjectIsGzipEncoded)� text_util)�bucket�contentEncoding�crc32c�customerEncryption� generation�md5Hash�name�sizec @ s* e Zd ZdZdd� Zdd� Zdd d �ZdS )� CatHelperzDProvides methods for the "cat" command and associated functionality.c C s || _ dS )zmInitializes the helper object. Args: command_obj: gsutil command instance of calling command. N)�command_obj)�selfr � r �%/opt/gsutil/gslib/utils/cat_helper.py�__init__3 s zCatHelper.__init__c C s$ |� tj�}|sq t�||� q dS )a� Copies contents of the source to the destination via buffered IO. Buffered reads are necessary in the case where you're reading from a source that produces more data than can fit into memory all at once. This method does not close either file when finished. Args: src_fd: The already-open source file to read from. dst_fd: The already-open destination file to write to. N)�read�io�DEFAULT_BUFFER_SIZEr �write_to_fd)r Zsrc_fdZdst_fd�bufr r r �_WriteBytesBufferedFileToFile; s z'CatHelper._WriteBytesBufferedFileToFileFr Nc C s� d}|du rt j}t j}t jt _�z�|rF|d dv rF| �t j|� �nt|D �]l}d} | j�|�jtd�D �]<} d}| j r�| j j r�| j j jr�t| j j jt �}|s�td| j j j| jf ��t|�}d} |r�|r�t� td| � d}| j } dt| d d � k �r|k�rn n W |t _dS t| j�}|�� �rlt| �}| jjj| j| j||||| j|j||jd� |�� qht|jd��}| �||� W d � qh1 �s�0 Y qh| sJt t!| ��qJW |t _n|t _0 dS ) a� Prints each of the url strings to stdout. Args: url_strings: String iterable. show_header: If true, print a header per file. start_byte: Starting byte of the file to print, used for constructing range requests. end_byte: Ending byte of the file to print; used for constructing range requests. If this is negative, the start_byte is ignored and and end range is sent over HTTP (such as range: bytes -9) cat_out_fd: File descriptor to which output should be written. Defaults to stdout if no file descriptor is supplied. Returns: 0 on success. Raises: CommandException if no URLs can be found. FNr )�-zfile://-)�bucket_listing_fieldszOMissing decryption key with SHA256 hash %s. No decryption key matches object %sTz ==> %s <==r ���)�compressed_encoding� start_byte�end_byte�object_sizer �decryption_tuple�provider�rb)"�sys�stdout�stderrr"