HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, 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
Upload Files
File: //usr/lib/python3.5/distutils/__pycache__/archive_util.cpython-35.pyc


Fa&@sdZddlZddlmZddlZyddlZWnek
rXdZYnXddlmZddl	m
Z
ddlmZddl
mZyddlmZWnek
rdZYnXydd	lmZWnek
rdZYnXd
dZdd
ZdddddddZddddZded&gdfded'gdfded(gdfded)gdfded*gdfd egd!fiZd"d#Zddddddd$d%ZdS)+zodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).N)warn)DistutilsExecError)spawn)mkpath)log)getpwnam)getgrnamcCs_tdks|dkrdSyt|}Wntk
rFd}YnX|dk	r[|dSdS)z"Returns a gid, given a group name.N)rKeyError)nameresultr
,/usr/lib/python3.5/distutils/archive_util.py_get_gids
rcCs_tdks|dkrdSyt|}Wntk
rFd}YnX|dk	r[|dSdS)z"Returns an uid, given a user name.Nr	)rr
)rrr
r
r_get_uid+s
rgzipcsddddddddddi}dd	dd
ddddi}|dk	rl||jkrltd
|d}	|dkr|	|j|d7}	ttjj|	d|ddl}
tj	dt
tfdd}|sE|
j|	d||}z|j
|d|Wd|jX|dkrtdt|	||}
tjdkr||	|
g}n|d|	g}t|d||
S|	S)a=Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    rZgzbzip2bz2xzNcompressz.gzz.bz2z.xzz.ZzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tardry_runrzCreating tar archivecs@dk	r|_|_dk	r<|_|_|S)N)gidZgnameuiduname)Ztarinfo)rgroupownerrr
r_set_uid_gidas				z"make_tarball.<locals>._set_uid_gidzw|%sfilterz'compress' will be deprecated.Zwin32z-f)keys
ValueErrorgetrospathdirnametarfilerinforropenaddcloserPendingDeprecationWarningsysplatformr)	base_namebase_dirrverboserrrZtar_compressionZcompress_extZarchive_namer%rtarZcompressed_namecmdr
)rrrrrmake_tarball7s<	

	
r2cCs|d}ttjj|d|tdkr|rAd}nd}y td|||gd|Wqtk
rtd|YqXntjd|||sytj	|d	d
tj
}Wn-tk
rtj	|d	d
tj}YnXxtj
|D]t\}}}	xb|	D]Z}
tjjtjj||
}tjj|r|j||tjd|qWqW|j|S)avCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    z.ziprNz-rz-rqzipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to itwZcompressionzadding '%s')rr"r#r$zipfilerrrr&ZZipFileZZIP_DEFLATEDRuntimeErrorZ
ZIP_STOREDwalknormpathjoinisfilewriter))r-r.r/rZzip_filenameZ
zipoptionsr3dirpathZdirnames	filenamesrr#r
r
rmake_zipfiles:	
	
	


!
r>Zgztarrzgzip'ed tar-fileZbztarrzbzip2'ed tar-fileZxztarrzxz'ed tar-fileZztarzcompressed tar filer0zuncompressed tar filer3zZIP filecCs%x|D]}|tkr|SqWdS)zqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N)ARCHIVE_FORMATS)Zformatsformatr
r
rcheck_archive_formatss
rAcCs7tj}|dk	rMtjd|tjj|}|sMtj||dkrbtj}d|i}	yt|}
Wn"t	k
rt
d|YnX|
d}x"|
dD]\}}
|
|	|<qW|dkr||	d<||	d	<z||||	}Wd|dk	r2tjd
|tj|X|S)aCreate an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'rzunknown archive format '%s'rr3rrzchanging back to '%s')r"getcwdrdebugr#abspathchdircurdirr?r
r )r-r@Zroot_dirr.r/rrrZsave_cwdkwargsZformat_infofuncargvalfilenamer
r
rmake_archives2
	



rM)rr)rr)rr)rr)rN)__doc__r"warningsrr+r5ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsrpwdrZgrprrrr2r>r?rArMr
r
r
r<module>sB


	G5