Files
PowerToys/src/modules/launcher/Wox.Infrastructure/FileSystemHelper/FileWrapper.cs
Clint Rutkas 92a2b83bc8 smaller stylecop fixes in Wox.Core and Wox.Infra (#5671)
* Headers
unneeded usings
files need blank line at bottom
Fixed double returns
Returns after braces

* commenting out stylecop
2020-08-05 14:06:42 -07:00

29 lines
764 B
C#

// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using Wox.Infrastructure.Logger;
namespace Wox.Infrastructure.FileSystemHelper
{
public class FileWrapper : IFileWrapper
{
public FileWrapper() { }
public string[] ReadAllLines(string path)
{
try
{
return File.ReadAllLines(path);
}
catch (IOException ex)
{
Log.Info($"File {path} is being accessed by another process| {ex.Message}");
return new string[] { String.Empty };
}
}
}
}