Class | Resolver |
A resolver that services hosts(5) format files. |
Function | searchFileFor |
Grep given file, which is in hosts(5) standard format, for an address entry with a given name. |
Function | searchFileForAll |
Search the given file, which is in hosts(5) standard format, for addresses associated with a given name. |
Parameters | |
file:str or bytes | The name of the hosts(5)-format file to search. |
name:bytes | The name to search for. |
Returns | |
None if the name is not found in the file, otherwise a str giving the first address in the file associated with the name. |
Parameters | |
hostsFile:FilePath | The name of the hosts(5)-format file to search. |
name:bytes | The name to search for. |
Returns | |
None if the name is not found in the file, otherwise a str giving the address in the file associated with the name. |