summaryrefslogtreecommitdiff
path: root/lib/ftp/doc/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <ingela@erlang.org>2021-01-29 18:43:28 +0100
committerIngela Anderton Andin <ingela@erlang.org>2021-02-05 10:16:21 +0100
commitab496b62705d3b7908b4bb56bd407bf7155ea649 (patch)
treeb06f4ca700ae0451227f8df5569ebc24e4aa00ff /lib/ftp/doc/src
parentadca0174dfa26c4ce050e3c2b49c306f8c0640f7 (diff)
downloaderlang-ab496b62705d3b7908b4bb56bd407bf7155ea649.tar.gz
ftp: Use OTP supervisor as intended
Due to legacy reasons FTP clients are not part of the FTP applications supervisor tree unless they where started with start_service/1. This function is a legcy from a mechanism in inets that was never intended to be part of the ftp application.
Diffstat (limited to 'lib/ftp/doc/src')
-rw-r--r--lib/ftp/doc/src/ftp.xml23
-rw-r--r--lib/ftp/doc/src/ftp_client.xml4
2 files changed, 12 insertions, 15 deletions
diff --git a/lib/ftp/doc/src/ftp.xml b/lib/ftp/doc/src/ftp.xml
index c643ba4fa0..3dc0c097ad 100644
--- a/lib/ftp/doc/src/ftp.xml
+++ b/lib/ftp/doc/src/ftp.xml
@@ -42,12 +42,10 @@
to active FTP mode if this fails. This default behavior can be
changed by start option <seeerl marker="#mode">mode</seeerl>.</p>
- <marker id="two_start"></marker>
-
- <p>An FTP client can be started in two ways. One is using the
- <seeerl marker="#service_start">service_start</seeerl> function,
- the other is to start it directly as a standalone process
- using function <seeerl marker="#open">open</seeerl>.</p>
+ <p>An FTP client is always started as part of the ftp application
+ and legacy
+ <seeerl marker="#service_start">start_service</seeerl> function,
+ is deprecated in OTP-24 </p>
<p>For a simple example of an FTP session, see
<seeguide marker="ftp_client">FTP User's Guide</seeguide>.</p>
@@ -74,16 +72,16 @@
error if the request is a listing of the contents of a directory
that exists but is empty.</p>
- <marker id="service_start"></marker>
+ <marker id="service_start"></marker>
</description>
<section>
- <title>FTP CLIENT SERVICE START/STOP</title>
+ <title>FTP CLIENT START/STOP</title>
<p>The FTP client can be started and stopped dynamically in runtime by
calling the <c>ftp</c> application API
- <c>ftp:start_service(ServiceConfig)</c> and
- <c>ftp:stop_service(Pid)</c>.</p>
+ <c>ftp:open(Host, Options)</c> and
+ <c>ftp:close(Client)</c>.</p>
<p>The available configuration options are as follows:</p>
@@ -538,7 +536,7 @@
<func>
<name since="">open(Host) -> {ok, Pid} | {error, Reason}</name>
<name since="">open(Host, Opts) -> {ok, Pid} | {error, Reason}</name>
- <fsummary>Starts a standalone FTP client.</fsummary>
+ <fsummary>Starts a FTP client.</fsummary>
<type>
<v>Host = string() | ip_address()</v>
<v>Opts = options()</v>
@@ -564,8 +562,7 @@
</type>
<desc>
- <p>Starts a standalone FTP client process
- (without the <c>ftp</c> service framework) and
+ <p>Starts a FTP client process and
opens a session with the FTP server at <c>Host</c>. </p>
<p>If option <c>{tls, tls_options()}</c> is present, the FTP session
diff --git a/lib/ftp/doc/src/ftp_client.xml b/lib/ftp/doc/src/ftp_client.xml
index 047b055be7..7686548388 100644
--- a/lib/ftp/doc/src/ftp_client.xml
+++ b/lib/ftp/doc/src/ftp_client.xml
@@ -55,7 +55,7 @@
<code type="erl"><![CDATA[
1> ftp:start().
ok
- 2> {ok, Pid} = ftp:start_service([{host, "erlang.org"}]).
+ 2> {ok, Pid} = ftp:open([{host, "erlang.org"}]).
{ok,<0.22.0>}
3> ftp:user(Pid, "guest", "password").
ok
@@ -69,7 +69,7 @@
ok
8> ftp:recv(Pid, "appl.erl").
ok
- 9> ftp:stop_service(Pid).
+ 9> ftp:close(Pid).
ok
10> ftp:stop().
ok