readlink method

Future<String> readlink(
  1. String path
)

Reads the target of a symbolic link.

Implementation

Future<String> readlink(String path) async {
  final reply = await _sendReadLink(path);
  if (reply is SftpNamePacket) return reply.names.first.filename;
  if (reply is! SftpStatusPacket) throw SftpError('Unexpected reply');
  throw SftpStatusError.fromStatus(reply);
}