Lines Matching +full:path +full:- +full:exists
24 # custom error-handling added.
33 if os.path.exists(dst):
71 the file exists, it will be ruthlessly clobbered.) If 'preserve_mode'
74 'preserve_times' is true (the default), the last-modified and
75 last-access times are copied as well. If 'update' is true, 'src' will
93 # XXX if the destination file already exists, we clobber it if
96 # should probably blow up if destination exists and we would be
103 if not os.path.isfile(src):
107 if os.path.isdir(dst):
109 dst = os.path.join(dst, os.path.basename(src))
111 dir = os.path.dirname(dst)
115 log.debug("not copying %s (output up-to-date)", src)
124 if os.path.basename(dst) == os.path.basename(src):
125 log.info("%s %s -> %s", action, src, dir)
127 log.info("%s %s -> %s", action, src, dst)
135 if not (os.path.exists(dst) and os.path.samefile(src, dst)):
145 if not (os.path.exists(dst) and os.path.samefile(src, dst)):
149 # Otherwise (non-Mac, not linking), copy the file contents and
165 # XXX I suspect this is Unix-specific -- need porting help!
174 Handles cross-device moves on Unix using 'copy_file()'. What about
177 from os.path import exists, isfile, isdir, basename, dirname
181 log.info("moving %s -> %s", src, dst)
190 dst = os.path.join(dst, basename(src))
191 elif exists(dst):
193 "can't move '%s': destination '%s' already exists" %
198 "can't move '%s': destination '%s' not a valid path" %