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::isRelative() #1289

Merged
merged 2 commits into from
Mar 14, 2025
Merged

Conversation

DanRStevens
Copy link
Collaborator

@DanRStevens DanRStevens commented Mar 14, 2025

It's tempting to add an isAbsolute() method as well, though the positive form of the test case presents challenges with Windows. The path / is considered relative on Windows (relative to the drive of the current working directory), while it is absolute on Linux and MacOS. Meanwhile a path such as C:\ won't have the same meaning on Linux and MacOS, where it would be considered a relative filename.

The same could be said for the negative form of an isRelative test. That's one reason why there are no negative tests for this member function.

Related:

@DanRStevens DanRStevens merged commit 8e6a523 into main Mar 14, 2025
8 checks passed
@DanRStevens DanRStevens deleted the filesystemPathRelative branch March 14, 2025 06:14
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