(folder)
| 37 | os.chmod(file_path, st.st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH) |
| 38 | |
| 39 | def rmFolderContents(folder): |
| 40 | if os.path.exists(folder): |
| 41 | for the_file in os.listdir(folder): |
| 42 | file_path = os.path.join(folder, the_file) |
| 43 | if os.path.exists(file_path): |
| 44 | if os.path.isfile(file_path): |
| 45 | rmFile(file_path) |
| 46 | else: |
| 47 | rmFolder(file_path) |
| 48 | |
| 49 | def rmFile(path): |
| 50 | if os.path.exists(path): |