mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
* Headers unneeded usings files need blank line at bottom Fixed double returns Returns after braces * commenting out stylecop
29 lines
764 B
C#
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 };
|
|
}
|
|
}
|
|
}
|
|
}
|