103 |
103 |
104 @param src name of the source directory |
104 @param src name of the source directory |
105 @param dst name of the destination directory |
105 @param dst name of the destination directory |
106 @param filters list of filter pattern determining the files to be copied |
106 @param filters list of filter pattern determining the files to be copied |
107 @param excludeDirs list of (sub)directories to exclude from copying |
107 @param excludeDirs list of (sub)directories to exclude from copying |
108 @keyparam excludePatterns list of filter pattern determining the files to |
108 @param excludePatterns list of filter pattern determining the files to |
109 be skipped |
109 be skipped |
110 """ |
110 """ |
111 if excludeDirs is None: |
111 if excludeDirs is None: |
112 excludeDirs = [] |
112 excludeDirs = [] |
113 if excludePatterns is None: |
113 if excludePatterns is None: |
184 """ |
184 """ |
185 Wrapper function around shutil.copy() to ensure the permissions. |
185 Wrapper function around shutil.copy() to ensure the permissions. |
186 |
186 |
187 @param src source file name (string) |
187 @param src source file name (string) |
188 @param dst destination file name or directory name (string) |
188 @param dst destination file name or directory name (string) |
189 @keyparam perm permissions to be set (integer) |
189 @param perm permissions to be set (integer) |
190 """ |
190 """ |
191 shutil.copy(src, dst) |
191 shutil.copy(src, dst) |
192 if os.path.isdir(dst): |
192 if os.path.isdir(dst): |
193 dst = os.path.join(dst, os.path.basename(src)) |
193 dst = os.path.join(dst, os.path.basename(src)) |
194 os.chmod(dst, perm) |
194 os.chmod(dst, perm) |