382 |
382 |
383 @param src name of the source directory |
383 @param src name of the source directory |
384 @param dst name of the destination directory |
384 @param dst name of the destination directory |
385 @param filters list of filter pattern determining the files to be copied |
385 @param filters list of filter pattern determining the files to be copied |
386 @param excludeDirs list of (sub)directories to exclude from copying |
386 @param excludeDirs list of (sub)directories to exclude from copying |
387 @keyparam excludePatterns list of filter pattern determining the files to |
387 @param excludePatterns list of filter pattern determining the files to |
388 be skipped |
388 be skipped |
389 """ |
389 """ |
390 if excludeDirs is None: |
390 if excludeDirs is None: |
391 excludeDirs = [] |
391 excludeDirs = [] |
392 if excludePatterns is None: |
392 if excludePatterns is None: |
693 """ |
693 """ |
694 Wrapper function around shutil.copy() to ensure the permissions. |
694 Wrapper function around shutil.copy() to ensure the permissions. |
695 |
695 |
696 @param src source file name (string) |
696 @param src source file name (string) |
697 @param dst destination file name or directory name (string) |
697 @param dst destination file name or directory name (string) |
698 @keyparam perm permissions to be set (integer) |
698 @param perm permissions to be set (integer) |
699 """ |
699 """ |
700 shutil.copy(src, dst) |
700 shutil.copy(src, dst) |
701 if os.path.isdir(dst): |
701 if os.path.isdir(dst): |
702 dst = os.path.join(dst, os.path.basename(src)) |
702 dst = os.path.join(dst, os.path.basename(src)) |
703 os.chmod(dst, perm) |
703 os.chmod(dst, perm) |