Maximize compatibility with `pathlib.Path`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
This project does aspire to align with pathlib where possible, so it should probably do the same (and probably implement `iterdir` at the same time, if it's not present already).
_Originally posted by @jaraco in https://github.com/jaraco/path/issues/212#issuecomment-1623882608_
Here some other methods that are worth considering:
```python
set(vars(pathlib.Path)) - set(vars(path.Path))
Out[9]:
{'__slots__',
'_make_child_relpath',
'_scandir',
'absolute',
'cwd',
'group',
'hardlink_to',
'home',
'is_block_device',
'is_char_device',
'is_dir',
'is_fifo',
'is_file',
'is_mount',
'is_socket',
'is_symlink',
'iterdir',
'lchmod',
'link_to',
'replace',
'resolve',
'rglob',
'symlink_to'}
```
- [x] absolute
- [x] cwd
- [x] group
- [x] hardlink_to
- [x] home
- [ ] is_block_device
- [ ] is_char_device
- [x] is_dir
- [ ] is_fifo
- [x] is_file
- [ ] is_mount
- [ ] is_socket
- [ ] is_symlink
- [x] iterdir
- [ ] lchmod
- [x] ~link_to~
- [ ] owner
- [x] replace
- [ ] resolve
- [ ] rglob
- [x] suffix
- [x] symlink_to
- [x] with_stem
- [x] with_name
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the methods listed from pathlib.Path with those available on path.Path, then review the unchecked compatibility items and any existing implementations. Define which remaining methods are in scope and verify that each selected method matches pathlib behavior before considering the issue complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100