File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/Files.App/Services/Windows Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2024 Files Community
2
2
// Licensed under the MIT License. See the LICENSE.
3
3
4
- using System . IO ;
5
-
6
4
namespace Files . App . Services
7
5
{
8
6
/// <inheritdoc cref="IWindowsIniService"/>
@@ -11,18 +9,18 @@ public sealed class WindowsIniService : IWindowsIniService
11
9
/// <inheritdoc/>
12
10
public List < IniSectionDataItem > GetData ( string filePath )
13
11
{
14
- if ( ! File . Exists ( filePath ) )
12
+ if ( ! SystemIO . File . Exists ( filePath ) )
15
13
return [ ] ;
16
14
17
15
var lines = Enumerable . Empty < string > ( ) . ToList ( ) ;
18
16
19
17
try
20
18
{
21
- lines = File . ReadLines ( filePath )
19
+ lines = SystemIO . File . ReadLines ( filePath )
22
20
. Where ( line => ! line . StartsWith ( ';' ) && ! string . IsNullOrEmpty ( line ) )
23
21
. ToList ( ) ;
24
22
}
25
- catch ( Exception ex ) when ( ex is UnauthorizedAccessException || ex is FileNotFoundException )
23
+ catch ( Exception ex ) when ( ex is UnauthorizedAccessException || ex is SystemIO . FileNotFoundException )
26
24
{
27
25
return [ ] ;
28
26
}
You can’t perform that action at this time.
0 commit comments