-module(ftp_test).

-export([test/5]).

test(Host, User, Password, Dir, File) ->
    application:start(inets),
    {ok, Pid} = ftp:open(Host, [verbose]),
    ok = ftp:user(Pid, User, Password),
    ok = ftp:cd(Pid, Dir),
    ok = ftp:recv(Pid, File),
    timer:sleep(1000),
    ok = ftp:recv(Pid, File),
    ftp:close(Pid).
