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

Define a lightweight struct to represent paths #257

Merged
merged 3 commits into from
Mar 3, 2024

Conversation

Corniel
Copy link
Contributor

@Corniel Corniel commented Feb 27, 2024

Buildalyzer both has to work on UNIX and Windows bases file systems. To deal with (potential) case sensitivity of paths, It also deals with different directory separator paths. The internal representation of IOPath uses UNIX's '/', and the .ToString() representation is file system based.

My plan is to start using this struct instead of string's for properties that represent IO Paths. Personally, I'm also a big fan of System.IO.FileInfo, and System.IO.DirectoryInfo, hence the methods to convert into one of these. The reason not use them directly has to do with the fact that both types handle equality based on their reference, not the thing the represent on the file system.

@phmonte phmonte added the Ready to Merge Ready to merge label Mar 2, 2024
@Corniel
Copy link
Contributor Author

Corniel commented Mar 2, 2024

@phmonte Ready for merge? (I'd like to use this in #243 )

@phmonte
Copy link
Owner

phmonte commented Mar 3, 2024

@Corniel done, thanks!

@phmonte phmonte merged commit e7f03dd into phmonte:main Mar 3, 2024
6 checks passed
@Corniel Corniel deleted the io-path branch March 3, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to Merge Ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants