Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding -Extension and -LeafBase switches to Split-Path#2721

Merged
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
powercode:split-path-switchespowercode/PowerShell:split-path-switchesCopy head branch name to clipboard
Mar 11, 2017
Merged

Adding -Extension and -LeafBase switches to Split-Path#2721
daxian-dbw merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
powercode:split-path-switchespowercode/PowerShell:split-path-switchesCopy head branch name to clipboard

Conversation

@powercode

Copy link
Copy Markdown
Collaborator

Fixes #2700

Extension and LeafBase are specializations of Leaf, and uses System.IO.Path.GetExtension
and System.IO.Path.GetFilenameWithoutExtension to extract parts from the Leaf

Tests added in test\powershell\Modules\Microsoft.PowerShell.Management\FileSystem.Tests.ps1

@msftclas

Copy link
Copy Markdown

Hi @powercode, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@powercode powercode changed the title Adding -Exension and -LeafBase switches to Split-Path Adding -Extension and -LeafBase switches to Split-Path Nov 18, 2016

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should there be explicit tests for things like:
"$level2_1Full$fileExt$fileExt"
to ensure that the trimming is not over-zealous?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the difference between LeafSet and LeafBaseSet?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The comment seems to be duplicated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The default value of _parent used to be true. The default for a switch is False. Please revisit.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. Fixing and rebasing.

Staffan Gustafsson added 3 commits March 3, 2017 22:34
…No functionallity changes

Using auto properties when no when there is no logic in getter/setter
Removing unused code
Removing redundant qualifiers
Removing Redundant initializers
Extension and LeafBase are specializations of Leaf, and uses System.IO.Path.GetExtension
and System.IO.Path.GetFilenameWithoutExtension to extract parts from the Leaf
@powercode powercode force-pushed the split-path-switches branch from ef0abc9 to 33e266e Compare March 4, 2017 04:08
@daxian-dbw

Copy link
Copy Markdown
Member

@charub your comments have been addressed, can you please take another look? If the change looks good, please approve the PR.

@daxian-dbw daxian-dbw merged commit 220eaa1 into PowerShell:master Mar 11, 2017
@powercode powercode deleted the split-path-switches branch April 19, 2017 17:28
@iSazonov iSazonov removed the Review - Needed The PR is being reviewed label Apr 20, 2017
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.

8 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.