This repository was archived by the owner on Jul 8, 2023. It is now read-only.
Home directory resolution system #33
Open
Description
It's a common use case for paths to use ~
or ~user
to indicate home directories. Pathogen should have a system for dealing with these cases.
Some things that probably need to happen:
FileSystemPathFactoryInterface
includes methods to get the current working directory, and system temporary directory. It probably needs to be expanded to have methods to get the current home directory, and the home directory of a specified user. They should always internally use the 'platform' path factory - this just ensures that they are Windows paths on Windows, and Unix-style on anything else.- A new resolver at
FileSystem\Resolver\HomeDirectoryResolver
that implements the newly refactoredPathResolverInterface
and uses an instance ofPlatformFileSystemPathFactory
to produce home directory paths using the new methods created in 1. This resolver could probably cache home directory lookups, I assume they're unlikely to change at runtime.
This task could be tackled at the same time as #36.