Files
PowerToys/src/modules/Hosts/HostsUILib/Helpers/IHostsService.cs
Davide Giacometti 9af757f5ce [Hosts] Handle hidden hosts file (#34308)
* handle hidden hosts file

* don't remove hidden attribute
2024-08-16 20:36:26 +02:00

31 lines
716 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.Collections.Generic;
using System.Threading.Tasks;
using HostsUILib.Models;
namespace HostsUILib.Helpers
{
public interface IHostsService
{
string HostsFilePath { get; }
event EventHandler FileChanged;
Task<HostsData> ReadAsync();
Task WriteAsync(string additionalLines, IEnumerable<Entry> entries);
Task<bool> PingAsync(string address);
void CleanupBackup();
void OpenHostsFile();
void RemoveReadOnlyAttribute();
}
}