Hi!
I need to send directory listing to a specified output stream (UART, Telnet...)
I'm trying to use function void SdFat::ls ( Print * pr, uint8_t flags = 0 ), but I don't understand what shall I pass to this function in Print * pr variable.
but I don't understand what shall I pass to this function
You pass is a pointer to something that derives from the Print class. Look at the classes you want to use. Do they derive from Print? HardwareSerial derives from Stream which derives from Print, so you could pass the address of an instance of the HardwareSerial class (like Serial) to the function.