(filepath)
| 113 | |
| 114 | # check if file is hidden in windows platform |
| 115 | def is_folder_hidden(filepath): |
| 116 | if _platform == "win32": |
| 117 | try: |
| 118 | attrs = ctypes.windll.kernel32.GetFileAttributesW(filepath) |
| 119 | assert attrs != -1 |
| 120 | result = bool(attrs & 2) |
| 121 | except (AttributeError, AssertionError): |
| 122 | result = False |
| 123 | return result |
| 124 | else: |
| 125 | return os.path.basename(filepath).startswith('.') |
| 126 | |
| 127 | |
| 128 | def read_file_generator(file, enc): |