From e0ee349fc426007c7b269660244aeda94ddadd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= Date: Mon, 26 Feb 2018 16:35:58 +0100 Subject: inets,ftp: Break out FTP from inets - Created initial directory structure for the FTP application. - Updated inets Makefiles to not include FTP related modules. - Remove ftp code from inets - Implement backward compatibility layer for FTP - Add inets_ftp_wrapper - Fix failing TCs Change-Id: I120ec5bdef0c3df4cee2d7880db2aec581505bc4 --- lib/ftp/doc/src/ftp_client.xml | 84 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 lib/ftp/doc/src/ftp_client.xml (limited to 'lib/ftp/doc/src/ftp_client.xml') diff --git a/lib/ftp/doc/src/ftp_client.xml b/lib/ftp/doc/src/ftp_client.xml new file mode 100644 index 0000000000..84705c1dba --- /dev/null +++ b/lib/ftp/doc/src/ftp_client.xml @@ -0,0 +1,84 @@ + + + + +
+ + 20042016 + Ericsson AB. All Rights Reserved. + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + FTP Client + Ingela Anderton Andin + + + + + + + ftp_client.xml +
+ +
+ Getting Started + +

FTP clients are considered to be rather temporary. Thus, + they are only started and stopped during runtime and cannot + be started at application startup. + The FTP client API is designed to allow some functions to + return intermediate results. This implies that only the process + that started the FTP client can access it with + preserved sane semantics. + If the process that started the FTP session + dies, the FTP client process terminates.

+ +

The client supports IPv6 as long as the underlying mechanisms + also do so.

+ +

The following is a simple example of an FTP session, where + the user guest with password password logs on to + the remote host erlang.org:

+ inets:start(). + ok + 2> {ok, Pid} = inets:start(ftpc, [{host, "erlang.org"}]). + {ok,<0.22.0>} + 3> ftp:user(Pid, "guest", "password"). + ok + 4> ftp:pwd(Pid). + {ok, "/home/guest"} + 5> ftp:cd(Pid, "appl/examples"). + ok + 6> ftp:lpwd(Pid). + {ok, "/home/fred"}. + 7> ftp:lcd(Pid, "/home/eproj/examples"). + ok + 8> ftp:recv(Pid, "appl.erl"). + ok + 9> inets:stop(ftpc, Pid). + ok + ]]> +

The file + appl.erl is transferred from the remote to the local + host. When the session is opened, the current directory at + the remote host is /home/guest, and /home/fred + at the local host. Before transferring the file, the current + local directory is changed to /home/eproj/examples, and + the remote directory is set to + /home/guest/appl/examples.

+
+
-- cgit v1.2.3 From 99dada0ab68e663b26e24e2363c4613c36aa717f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= Date: Fri, 9 Mar 2018 13:30:40 +0100 Subject: ftp: Remove references to inets Change-Id: I19bd2f1d4a35cbc5c233ebc8b2a9d52bbd37f047 --- lib/ftp/doc/src/ftp_client.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/ftp/doc/src/ftp_client.xml') diff --git a/lib/ftp/doc/src/ftp_client.xml b/lib/ftp/doc/src/ftp_client.xml index 84705c1dba..047b055be7 100644 --- a/lib/ftp/doc/src/ftp_client.xml +++ b/lib/ftp/doc/src/ftp_client.xml @@ -4,7 +4,7 @@
- 20042016 + 20042018 Ericsson AB. All Rights Reserved. @@ -23,7 +23,7 @@ FTP Client - Ingela Anderton Andin + Péter Dimitrov @@ -53,9 +53,9 @@ the user guest with password password logs on to the remote host erlang.org:

inets:start(). + 1> ftp:start(). ok - 2> {ok, Pid} = inets:start(ftpc, [{host, "erlang.org"}]). + 2> {ok, Pid} = ftp:start_service([{host, "erlang.org"}]). {ok,<0.22.0>} 3> ftp:user(Pid, "guest", "password"). ok @@ -69,7 +69,9 @@ ok 8> ftp:recv(Pid, "appl.erl"). ok - 9> inets:stop(ftpc, Pid). + 9> ftp:stop_service(Pid). + ok + 10> ftp:stop(). ok ]]>

The file -- cgit v1.2.3