swift-nio icon indicating copy to clipboard operation
swift-nio copied to clipboard

feat: add homeDirectory accessor to FileSystem

Open cnaples79 opened this issue 2 months ago • 2 comments

Summary

  • surface a homeDirectory property on FileSystemProtocol and the concrete file system implementation
  • resolve the current user's home directory via environment variables with a getpwuid_r fallback

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

cnaples79 avatar Oct 01 '25 00:10 cnaples79

@glbrntt Thanks for the feedback. Sure, I'll make those changes and update the PR!

cnaples79 avatar Oct 02 '25 10:10 cnaples79

hey @cnaples79 are you still working on this?

PhantomInTheWire avatar Oct 22 '25 23:10 PhantomInTheWire