swift-nio
swift-nio copied to clipboard
feat: add homeDirectory accessor to FileSystem
Summary
- surface a
homeDirectoryproperty onFileSystemProtocoland the concrete file system implementation - resolve the current user's home directory via environment variables with a
getpwuid_rfallback
Rationale
- fixes #3381 by providing an async API to retrieve the current user's home directory
Changes
- add protocol requirements and implementations for
homeDirectory - extend syscall helpers and error mapping to support
getpwuid_r - document the new API and add an integration test covering the returned path
Fixes #3381
@glbrntt Thanks for the feedback. Sure, I'll make those changes and update the PR!
hey @cnaples79 are you still working on this?