pxblat.files(host: str, port: int) list[str][source]

Get a list of files available on the server.

Parameters:
host : str

The hostname or IP address of the server to check.

port : int

The port number to use when attempting to connect to the server.

Returns:

A list of file names available on the server.

Return type:

List[str]

This function retrieves a list of files available on the server by sending a “files” message to the server. The function takes the hostname and port number of the server as arguments. The function returns a list of file names available on the server.

Example

>>> files("localhost", 8080)
['file1', 'file2', 'file3']