(s)
| 221 | magic_check_bytes = re.compile(b'([*?[])') |
| 222 | |
| 223 | def has_magic(s): |
| 224 | if isinstance(s, bytes): |
| 225 | match = magic_check_bytes.search(s) |
| 226 | else: |
| 227 | match = magic_check.search(s) |
| 228 | return match is not None |
| 229 | |
| 230 | def _ishidden(path): |
| 231 | return path[0] in ('.', b'.'[0]) |