| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.7/site-packages/slip/util/ |
Upload File : |
�
��9Qc @ s� d Z d d d d d g Z d d l Z d d l Z d d l Z d d l Z d d l Z d Z d � Z g d
� Z d � Z
e e d � Z e e d
� Z
e e d � Z e e d � Z d S( s= This module contains helper functions for dealing with files.t
issamefilet linkfilet copyfilet linkorcopyfilet overwrite_safelyi����Ni c C s1 t j | � } t j | � } t j j | | � S( N( t ost statt patht samestat( t path1t path2t s1t s2( ( s3 /usr/lib/python2.7/site-packages/slip/util/files.pyt _issamefile# s c C s? | t k r t } n y t | | � SWn | k
r: t SXd S( sE Check whether two paths point to the same file (i.e. are hardlinked).N( t Truet ExceptionR
t False( R R
t catch_stat_exceptions( ( s3 /usr/lib/python2.7/site-packages/slip/util/files.pyR * s
c C s� t | | d t �r d St j j | � } t j j | � } t j j | � } t } x t t j
� D]n } t j d | t j d | � } y t j
| | � Wn+ t k
r� } | j t j k r� q� � qe Xt } Pqe W| r� t j | | � n d S( sU Hardlink srcpath to dstpath.
Attempt to atomically replace dstpath if it exists.R Nt prefixt dir( R t OSErrorR R t abspatht dirnamet basenameR t xranget tempfilet TMP_MAXt mktempt extsept linkt errnot EEXISTR t rename( t srcpatht dstpatht dstdnamet dstbnamet
hardlinkedt attemptt _dsttmpt e( ( s3 /usr/lib/python2.7/site-packages/slip/util/files.pyR 6 s$ c
C s� t | | d t �r d St j j | � } t j j | � } t j j | � } t | d � } t j d | t j j
d | d t � } t } | r� y t j
| | j � t } Wq� t j t f k
r� q� Xn | s� t j
| | j � n d } xa | d k rT| j t � } y | j | � Wq� | j � | j � t j | j � � q� Xq� W| j � | j � t j | j | � | r�t j � d k r�t j | � n d S( s� Copy srcpath to dstpath.
Abort operation if e.g. not enough space is available. Attempt to
atomically replace dstpath if it exists.R Nt rbR R t deletet i ( R R R R R R R t openR t NamedTemporaryFileR R t shutilt copymodet nameR t Errort Nonet readt BLOCKSIZEt writet closet unlinkR t selinuxt is_selinux_enabledt
restorecon(
R! R"