Skip to content

Commit b825059

Browse files
System.IO.Abstractions update
1 parent 32f3e6b commit b825059

File tree

17 files changed

+27
-21
lines changed

17 files changed

+27
-21
lines changed

src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
4444
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
4545
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
46-
<PackageReference Include="System.IO.Abstractions" Version="12.2.5" />
46+
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
4747
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
4848
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
4949
</ItemGroup>

src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
<ItemGroup>
5050
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
51-
<PackageReference Include="System.IO.Abstractions" Version="12.2.5" />
51+
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
5252
<PackageReference Include="System.Text.Json" Version="6.0.2" />
5353
</ItemGroup>
5454
<ItemGroup>

src/modules/imageresizer/tests/ImageResizerUITest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<PackageReference Include="Moq" Version="4.16.1" />
5555
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
5656
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
57-
<PackageReference Include="System.IO.Abstractions" Version="12.2.5" />
57+
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
5858
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
5959
</ItemGroup>
6060
</Project>

src/modules/imageresizer/ui/ImageResizerUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
4949
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
5050
<PackageReference Include="System.IO.Abstractions">
51-
<Version>12.2.5</Version>
51+
<Version>17.2.3</Version>
5252
</PackageReference>
5353
<PackageReference Include="System.Text.Json" Version="6.0.2" />
5454
</ItemGroup>

src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/InternalQueryFolderTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System;
66
using System.Collections.Generic;
7+
using System.IO;
78
using System.IO.Abstractions.TestingHelpers;
89
using System.Linq;
910
using Microsoft.Plugin.Folder.Sources;
@@ -31,7 +32,7 @@ public void SetupMock()
3132
{ @"c:\Test\b\", new MockDirectoryData() },
3233
});
3334

34-
_queryFileSystemInfoMock = new QueryFileSystemInfo(_fileSystem.DirectoryInfo);
35+
_queryFileSystemInfoMock = new QueryFileSystemInfo(_fileSystem.DirectoryInfo, MatchType.Simple, FileAttributes.Hidden | FileAttributes.System);
3536
}
3637

3738
[TestMethod]

src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/Microsoft.Plugin.Folder.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
1515
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
16-
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="12.2.3" />
16+
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Main.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System;
66
using System.Collections.Generic;
7+
using System.IO;
78
using System.IO.Abstractions;
89
using System.Linq;
910
using System.Windows.Controls;
@@ -24,7 +25,7 @@ public class Main : IPlugin, IPluginI18n, ISavable, IContextMenu, IDisposable
2425
private static readonly IFileSystem _fileSystem = new FileSystem();
2526
private static readonly PluginJsonStorage<FolderSettings> _storage = new PluginJsonStorage<FolderSettings>();
2627
private static readonly FolderSettings _settings = _storage.Load();
27-
private static readonly IQueryInternalDirectory _internalDirectory = new QueryInternalDirectory(_settings, new QueryFileSystemInfo(_fileSystem.DirectoryInfo), _fileSystem.Directory);
28+
private static readonly IQueryInternalDirectory _internalDirectory = new QueryInternalDirectory(_settings, new QueryFileSystemInfo(_fileSystem.DirectoryInfo, MatchType.Win32, FileAttributes.Hidden), _fileSystem.Directory);
2829
private static readonly FolderHelper _folderHelper = new FolderHelper(new DriveInformation(), new FolderLinksSettings(_settings));
2930
private static readonly IEnvironmentHelper _environmentHelper = new EnvironmentHelper();
3031
private static readonly IQueryEnvironmentVariable _queryEnvironmentVariable = new QueryEnvironmentVariable(_fileSystem.Directory, _environmentHelper);

src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
<ItemGroup>
5656
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
57-
<PackageReference Include="System.IO.Abstractions" Version="12.2.5" />
57+
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
5858
<PackageReference Include="System.Runtime" Version="4.3.1" />
5959
</ItemGroup>
6060

src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Sources/QueryFileSystemInfo.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation
1+
// Copyright (c) Microsoft Corporation
22
// The Microsoft Corporation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -12,23 +12,27 @@ namespace Microsoft.Plugin.Folder.Sources
1212
public class QueryFileSystemInfo : IQueryFileSystemInfo
1313
{
1414
private readonly IDirectoryInfoFactory _directoryInfoFactory;
15+
private readonly MatchType _matchType;
16+
private readonly FileAttributes _attributesToSkip;
1517

16-
public QueryFileSystemInfo(IDirectoryInfoFactory directoryInfoFactory)
18+
public QueryFileSystemInfo(IDirectoryInfoFactory directoryInfoFactory, MatchType matchType, FileAttributes attributesToSkip)
1719
{
1820
_directoryInfoFactory = directoryInfoFactory;
21+
_matchType = matchType;
22+
_attributesToSkip = attributesToSkip;
1923
}
2024

2125
public IEnumerable<DisplayFileInfo> MatchFileSystemInfo(string search, string incompleteName, bool isRecursive)
2226
{
2327
// search folder and add results
2428
var directoryInfo = _directoryInfoFactory.FromDirectoryName(search);
25-
var fileSystemInfos = directoryInfo.EnumerateFileSystemInfos(incompleteName, new EnumerationOptions()
29+
var fileSystemInfos = directoryInfo.EnumerateFileSystemInfos(incompleteName, new EnumerationOptions
2630
{
27-
MatchType = MatchType.Win32,
31+
MatchType = _matchType,
2832
RecurseSubdirectories = isRecursive,
2933
IgnoreInaccessible = true,
3034
ReturnSpecialDirectories = false,
31-
AttributesToSkip = FileAttributes.Hidden,
35+
AttributesToSkip = _attributesToSkip,
3236
MatchCasing = MatchCasing.PlatformDefault,
3337
});
3438

src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
4545
<PackageReference Include="NLog.Schema" Version="4.7.13" />
4646
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
47-
<PackageReference Include="System.IO.Abstractions" Version="12.2.5" />
47+
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
4848
<PackageReference Include="System.Runtime" Version="4.3.1" />
4949
</ItemGroup>
5050
</Project>

0 commit comments

Comments
 (0)