[TIC-CORE] Set the default installation packages
[archive/20170607/tools/tic-core.git] / tic / utils / file.py
index 442f3ce..b1cf3ac 100644 (file)
@@ -44,8 +44,12 @@ def decompress_gzip(intput_path, output_path):
         f.close()
     return output_path
 
-def copyfile(src, dst):
+def copyfile(src, dst, filename=None):
     abs_dst=os.path.abspath(os.path.expanduser(dst))
     make_dirs(abs_dst)
+    if filename:
+        abs_dst = os.path.join(abs_dst, filename)
     shutil.copy(src, abs_dst)
+    if filename:
+        return abs_dst
     return os.path.join(abs_dst, os.path.basename(src))
\ No newline at end of file