Lines Matching refs:path
20 if not os.path.isdir(src):
22 if not os.path.isdir(dst):
26 abs_src = os.path.abspath(src)
30 def output(out, sym, dst, path):
32 out.write('%s %s%s%s\n' % (sym, dst, os.sep, path))
35 path = os.path.normpath(os.path.join(dirpath, filename))
36 if path not in src_files:
37 output(out, '-', dst, path)
38 os.remove(path)
40 path = os.path.normpath(os.path.join(dirpath, filename))
41 if not os.listdir(path): # Remove empty subfolders.
42 output(out, '-', dst, path + os.sep)
43 os.rmdir(path)
44 for path in src_files:
45 src_path = os.path.join(abs_src, path)
46 if os.path.exists(path):
47 with open(path) as f1:
51 output(out, '+', dst, path)
52 shutil.copy2(src_path, path)