PHP 8.2.30
Preview: test_support.py Size: 383 B
//opt/hc_python/lib/python3.12/site-packages/inotify/test_support.py

import os
import logging
import shutil
import tempfile
import contextlib

_LOGGER = logging.getLogger(__name__)

@contextlib.contextmanager
def temp_path():
    path = tempfile.mkdtemp()

    original_wd = os.getcwd()
    os.chdir(path)

    try:
        yield path
    finally:
        os.chdir(original_wd)

        if os.path.exists(path) is True:
            shutil.rmtree(path)

Directory Contents

Dirs: 2 × Files: 6

Name Size Perms Modified Actions
resources DIR
- drwxr-xr-x 2025-12-03 08:02:54
Edit Download
- drwxr-xr-x 2025-12-03 08:02:54
Edit Download
12.99 KB lrw-r--r-- 2025-12-03 08:02:54
Edit Download
1.77 KB lrw-r--r-- 2025-12-03 08:02:54
Edit Download
2.20 KB lrw-r--r-- 2025-12-03 08:02:54
Edit Download
177 B lrw-r--r-- 2025-12-03 08:02:54
Edit Download
383 B lrw-r--r-- 2025-12-03 08:02:54
Edit Download
0 B lrw-r--r-- 2025-12-03 08:02:54
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).