Table of Contents

Class HostsFile

Namespace
Fabricator.Resources
Assembly
Fabricator.Resources.dll
[CompilationMapping(SourceConstructFlags.ObjectType)]
public class HostsFile
Inheritance
HostsFile
Inherited Members

Methods

Record(string, string, FSharpOption<AbsolutePath>?)

Creates a resource for managing a host file entry.

public static IResource Record(string ipAddress, string host, FSharpOption<AbsolutePath>? hostsFilePath)

Parameters

ipAddress string

The IP address for the host entry.

host string

The hostname to map to the IP address.

hostsFilePath FSharpOption<AbsolutePath>

Optional path to the hosts file. Defaults to the platform-specific hosts file path: Windows: %SystemRoot%\drivers\etc\hosts (resolved dynamically), Linux/macOS: /etc/hosts

Returns

IResource

An IResource for managing the host file entry.