module documentation
hosts(5) support.
| Class | |
A resolver that services hosts(5) format files. |
| Function | search |
Grep given file, which is in hosts(5) standard format, for an address entry with a given name. |
| Function | search |
Search the given file, which is in hosts(5) standard format, for addresses associated with a given name. |
Grep given file, which is in hosts(5) standard format, for an address entry 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. | |
Search the given file, which is in hosts(5) standard format, for addresses associated with a given name.
| Parameters | |
hostsFilePath | 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. | |