Skip to content

Conversation

@powercode
Copy link
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

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
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
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
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
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
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
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
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