mkdir method

Future<void> mkdir(
  1. String path, [
  2. SftpFileAttrs? attrs
])

Makes a directory at the given path.

Implementation

Future<void> mkdir(String path, [SftpFileAttrs? attrs]) async {
  final reply = await _sendMakeDir(path, attrs ?? SftpFileAttrs());
  if (reply is! SftpStatusPacket) throw SftpError('Unexpected reply');
  SftpStatusError.check(reply);
}