Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method FilesystemPath::absolute() #1290

Merged
merged 2 commits into from
Mar 15, 2025
Merged

Conversation

DanRStevens
Copy link
Collaborator

Add method to convert relative paths to absolute paths.

A path that is already absolute should not be modified.

This may help with writing unit tests that work for all of Windows, Linux, and MacOS. In particular, paths starting with / are absolute on Linux and MacOS, but relative on Windows (since they are relative to the drive of the current working directory).

Related:

Converts the path to an absolute path.

This could be useful in some of the unit tests, to normalize the differences between Windows and Linux or MacOS.
@DanRStevens DanRStevens merged commit 2cc3b00 into main Mar 15, 2025
8 checks passed
@DanRStevens DanRStevens deleted the filesystemPathAbsolute branch March 15, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant