??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
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_safelyiNi 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 | | rt j d k rt 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" t copy_mode_from_dstt run_restoreconR# R$ t srcfilet
dsttmpfilet mode_copiedt data( ( s3 /usr/lib/python2.7/site-packages/slip/util/files.pyR W s@
c C si y t | | d SWn: t k
rQ } | j t j t j t j f k rR qR n Xt | | | | d S( st First attempt to hardlink srcpath to dstpath, if hardlinking isn't
possible, attempt copying srcpath to dstpath.N( R R R t EMLINKt EPERMt EXDEVR ( R! R" R; R<