(s)
| 243 | magic_check_bytes = re.compile(b'([*?[])') |
| 244 | |
| 245 | def has_magic(s): |
| 246 | if isinstance(s, bytes): |
| 247 | match = magic_check_bytes.search(s) |
| 248 | else: |
| 249 | match = magic_check.search(s) |
| 250 | return match is not None |
| 251 | |
| 252 | def _ishidden(path): |
| 253 | return path[0] in ('.', b'.'[0]) |