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

Use DefaultPathSeparator char instead of DefaultPathSeparatorString #8082

Merged
merged 5 commits into from Oct 31, 2018

Conversation

iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Oct 19, 2018

PR Summary

Replace string operations on char ones by using overloads like StartsWith(char) and EndsWith(char).

It speeds up path operations in filesystem provider and globbing.

PR Checklist

@iSazonov iSazonov added the Issue-Code Cleanup the issue is for cleaning up the code with no impact on functionality label Oct 19, 2018
@iSazonov iSazonov self-assigned this Oct 19, 2018
@anmenaga
Copy link
Contributor

I'm curious, what was the reason why Path Separator was a string (rather than a char)?

@SteveL-MSFT
Copy link
Member

@anmenaga .NET Framework only has overload for string, .NET Core added overload for char

@iSazonov iSazonov merged commit ecb467c into PowerShell:master Oct 31, 2018
@iSazonov iSazonov deleted the cleanup-defaultpathseparator branch October 31, 2018 03:26
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 9, 2019
…owerShell#8082)

In:
* SessionStateLocationAPIs
* FileSystemProvider
* LocationGlobber
* NavigationProviderBase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Code Cleanup the issue is for cleaning up the code with no impact on functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants