Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public FileSystemProvider()
private Collection<WildcardPattern> _excludeMatcher = null;
private static System.IO.EnumerationOptions _enumerationOptions = new System.IO.EnumerationOptions
{
MatchType = MatchType.Win32,
MatchCasing = MatchCasing.CaseInsensitive,
AttributesToSkip = 0 // Default is to skip Hidden and System files, so we clear this to retain existing behavior
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ Describe "Get-ChildItem" -Tags "CI" {
$file.Count | Should be 1
$file.Name | Should be "pagefile.sys"
}

It "-Filter *. finds extension-less files" {
$null = New-Item -Path TestDrive:/noextension -ItemType File
(Get-ChildItem -File -LiteralPath TestDrive:/ -Filter noext*.*).Name | Should -BeExactly 'noextension'
}
}

Context 'Env: Provider' {
Expand Down