| 118 | return fnmatch.filter(names, pattern) |
| 119 | |
| 120 | def _glob0(dirname, basename, dir_fd, dironly, include_hidden=False): |
| 121 | if basename: |
| 122 | if _lexists(_join(dirname, basename), dir_fd): |
| 123 | return [basename] |
| 124 | else: |
| 125 | # `os.path.split()` returns an empty basename for paths ending with a |
| 126 | # directory separator. 'q*x/' should match only directories. |
| 127 | if _isdir(dirname, dir_fd): |
| 128 | return [basename] |
| 129 | return [] |
| 130 | |
| 131 | _deprecated_function_message = ( |
| 132 | "{name} is deprecated and will be removed in Python {remove}. Use " |