We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path
*
fnmatch
str
Example:
$ tree tmp tmp ├── test.txt └── tmp └── test.txt
$ python Python 3.8.6 (default, Oct 9 2020, 13:24:27) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin >>> from pathlib import Path >>> p = Path('tmp') >>> list(p.glob('*')) [PosixPath('tmp/test.txt'), PosixPath('tmp/tmp')] >>> list(p.glob('**/*')) [PosixPath('tmp/test.txt'), PosixPath('tmp/tmp'), PosixPath('tmp/tmp/test.txt')] >>> >>> from pfio.v2.pathlib import Path as Path2 >>> pp = Path2('tmp') >>> list(pp.glob('*')) ['test.txt', 'tmp/', 'tmp/test.txt'] >>> list(pp.glob('**/*')) ['tmp/', 'tmp/test.txt'] >>> >>> type(list(p.glob('*'))[0]) <class 'pathlib.PosixPath'> >>> type(list(pp.glob('*'))[0]) <class 'str'>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Path
get paths recursively when set*
because of usingfnmatch
and pattern matchingstr
Example:
The text was updated successfully, but these errors were encountered: