UNPKG

ftp-srv-esm

Version:

Modern, extensible FTP server (daemon) for Node.js with ESM support. Based on ftp-srv.

15 lines (12 loc) 511 B
export default { directive: 'REST', handler: function ({command} = {}) { const arg = command?.arg; const byteCount = parseInt(arg, 10); if (isNaN(byteCount) || byteCount < 0) return this.reply(501, 'Byte count must be 0 or greater'); this.restByteCount = byteCount; return this.reply(350, `Restarting next transfer at ${byteCount}`); }, syntax: '{{cmd}} <byte-count>', description: 'Restart transfer from the specified point. Resets after any STORE or RETRIEVE' };