---
name: "FtpWrite"
section: "3"
platform: "linux"
package: "ftplib-dev"
version: "3.1-1-9"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/FtpWrite"
---

# FtpWrite(3)

Write data to a remote file.

## NAME

FtpWrite - Write data to a remote file.

## SYNOPSIS

**#include \<ftplib.h\>**\

**int FtpWrite(void \****buf***, int** *len***, netbuf \****nData***);**

## PARAMETERS

- **buf**

  A buffer containing the data to be sent to the remote file.

- **len**

  The number of bytes to be sent from 'buf'.

- **nData**

  A handle returned by FtpAccess().

## DESCRIPTION

FtpWrite() sends data to a remote file. If the file were accessed in record mode, the necessary conversions are performed.

## RETURN VALUE

Returns the number of bytes sent from the user's buffer or -1 on error.
