2016-10-27 18:46:43 -07:00
|
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
|
|
|
{
|
2016-11-08 23:23:13 -08:00
|
|
|
|
public static partial class FileInfoExtensions
|
2016-10-27 18:46:43 -07:00
|
|
|
|
{
|
2023-11-10 17:08:10 -08:00
|
|
|
|
public static FileInfoAssertions Should(this FileInfo file) => new FileInfoAssertions(file);
|
2016-10-27 18:46:43 -07:00
|
|
|
|
|
2023-11-10 17:08:10 -08:00
|
|
|
|
public static IDisposable Lock(this FileInfo subject) => new FileInfoLock(subject);
|
2016-11-08 23:23:13 -08:00
|
|
|
|
|
2023-11-10 17:08:10 -08:00
|
|
|
|
public static IDisposable NuGetLock(this FileInfo subject) => new FileInfoNuGetLock(subject);
|
2017-01-06 01:40:26 -08:00
|
|
|
|
|
2023-11-10 17:08:10 -08:00
|
|
|
|
public static string ReadAllText(this FileInfo subject) => File.ReadAllText(subject.FullName);
|
2016-10-27 18:46:43 -07:00
|
|
|
|
}
|
|
|
|
|
}
|