Ftp:makedir(path)


Creates a new directory on the FTP server.

This operation is done by a Task asynchronously (other Tasks will be executed concurrently without blocking execution flow)

Parameters

path

A string that contains the name of the directory to be created. This can be either a fully qualified path or a name relative to the current FTP directory.

Return value


This method return a Task instance. Once the Task has finished, it will return a boolean value indicating if the operation was successful.

Example

local net = require "net" -- connect to the FTP server local url = "your ftp server" local client = net.Ftp(url, "username", "password") -- make directory "/test/" if await(client:makedir("/test/")) then print("Successfully created FTP directory '/test/'") else error(net.error) end