edgeport - v1.0.3
    Preparing search index...

    Function connect

    • Connects to an FTP server and logs in, returning a ready session.

      Opens a plaintext control connection (tls: 'off'), reads the 220 greeting, runs USER/PASS, and switches to binary mode with TYPE I. A rejected login (530/532) surfaces as AuthError; any other command failure surfaces as ProtocolError.

      Parameters

      Returns Promise<FtpSession>

      The authenticated session.

      If the server rejects the credentials.

      If the connection cannot be established.

      If the server speaks the protocol incorrectly.

      1.0.0

      import { connect } from 'edgeport/ftp';

      await using session = await connect({
      hostname: 'ftp.example.com',
      username: 'me',
      password: 'secret'
      });
      const entries = await session.list('/pub');