Skip to content

Conversation

@fzhinkin
Copy link
Collaborator

Fixes #223

@fzhinkin fzhinkin linked an issue Oct 12, 2023 that may be closed by this pull request
@fzhinkin fzhinkin force-pushed the fs-implement-resolve branch from 0430ebf to 52b7387 Compare October 12, 2023 12:58
@fzhinkin fzhinkin marked this pull request as ready for review October 12, 2023 15:32
@fzhinkin fzhinkin requested a review from shanshin October 12, 2023 15:33
}

@Test
fun resolve() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I need to add more tests: to check for an exception if the path does not exist, to check for an absolute path, etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the test for absolute path, all other cases are already there.

It would be nice to test symlink resolution, but we don't have an API for links yet.


val src = Path(root, "a", "..", "a", ".", "b", "..", "..", "c", ".", "d")
try {
// root/a/../a/./b/../../c/./d -> root/c/d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fzhinkin fzhinkin merged commit f85bebd into develop Oct 18, 2023
@fzhinkin fzhinkin deleted the fs-implement-resolve branch October 18, 2023 14:43
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.

Support getting a canonical file Path

3 participants