Add os.linkat() function to create a hard link with flags
未關閉
還沒有人認領這個 Issue。
extension-modules
type-feature
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Feature or enhancement
Proposal:
os.link() can call linkat() but it only supports AT_SYMLINK_FOLLOW flag (follow_symlinks=True), it doesn't support AT_EMPTY_PATH. I propose adding the os.linkat() function to create a hard link with flags, and add the following constants:
- os.AT_FDCWD
- os.AT_SYMLINK_FOLLOW
- os.AT_EMPTY_PATH
AT_EMPTY_PATH allows creating a hard link from an unnamed name even if /proc is not mounted.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
https://github.com/python/cpython/issues/136156
Linked PRs
- gh-136417
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先閱讀 issue 136156 中的相關討論和連結的 PR 136417,然後檢查 os.link() 目前如何公開 linkat() 和 AT_SYMLINK_FOLLOW。完成的標準是實作 os.linkat() 的提議行為以及 AT_FDCWD、AT_SYMLINK_FOLLOW 和 AT_EMPTY_PATH 常數,並進行適當的平台處理。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- operating-systems
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100