File: ct_ftp.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (243 lines) | stat: -rw-r--r-- 3,502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
.TH ct_ftp 3 "common_test  1.3.2" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
ct_ftp \- Common Test specific layer on top of OTP ftp clinet ftp\&.erl\&.
.SH DESCRIPTION
.LP
Common Test specific layer on top of OTP ftp clinet ftp\&.erl 

.SH DATA TYPES
.RS 2
.TP 4
.B
\fIconnection() = handle() | target_name() (see module ct)\fR:

.TP 4
.B
\fIhandle() = handle() (see module ct_gen_conn)\fR:

.RS 4
.LP
Handle for a specific ftp connection\&.
.LP

.RE
.RE
.SH EXPORTS
.LP
.B
cd(Connection, Dir) -> ok | {error, Reason}
.br
.RS
.TP
Types
Connection = connection()
.br
Dir = string()
.br
.RE
.RS
.LP
Change directory on remote host\&.
.RE
.LP
.B
close(Connection) -> ok | {error, Reason}
.br
.RS
.TP
Types
Connection = connection()
.br
.RE
.RS
.LP
Close the FTP connection\&.
.RE
.LP
.B
delete(Connection, File) -> ok | {error, Reason}
.br
.RS
.TP
Types
Connection = connection()
.br
File = string()
.br
.RE
.RS
.LP
Delete a file on remote host
.RE
.LP
.B
get(Name, RemoteFile, LocalFile) -> ok | {error, Reason}
.br
.RS
.TP
Types
Name = target_name()
.br
RemoteFile = string()
.br
LocaFile = string()
.br
.RE
.RS
.LP
Open a ftp connection and fetch a file from the remote host\&.
.LP
\fIRemoteFile\fR and \fILocalFile\fR must be absolute paths\&.
.LP
The config file must be as for put/3\&.
.LP
\fISee also:\fR put/3\&.
.RE
.LP
.B
ls(Connection, Dir) -> {ok, Listing} | {error, Reason}
.br
.RS
.TP
Types
Connection = connection()
.br
Dir = string()
.br
Listing = string()
.br
.RE
.RS
.LP
List the directory Dir\&.
.RE
.LP
.B
open(Name) -> {ok, Handle} | {error, Reason}
.br
.RS
.TP
Types
Name = target_name() (see module ct)
.br
Handle = handle()
.br
.RE
.RS
.LP
Open an FTP connection to the specified node\&.
.RE
.LP
.B
put(Name, LocalFile, RemoteFile) -> ok | {error, Reason}
.br
.RS
.TP
Types
Name = target_name()
.br
LocaFile = string()
.br
RemoteFile = string()
.br
.RE
.RS
.LP
Open a ftp connection and send a file to the remote host\&.
.LP
\fILocalFile\fR and \fIRemoteFile\fR must be absolute paths\&.
.LP
If the target host is a "special" node, the ftp address must be specified in the config file like this:

.nf
   {node,[{ftp,IpAddr}]}\&.
.fi
.LP
If the target host is something else, e\&.g\&. a unix host, the config file must also include the username and password (both strings):

.nf
   {unix,[{ftp,IpAddr},
          {username,Username},
          {password,Password}]}\&.
.fi
.RE
.LP
.B
recv(Connection, RemoteFile) -> ok | {error, Reason}
.br
.RS
.LP
Fetch a file over FTP\&. 
.LP
The file will get the same name on the local host\&.
.LP
\fISee also:\fR recv/3\&.
.RE
.LP
.B
recv(Connection, RemoteFile, LocalFile) -> ok | {error, Reason}
.br
.RS
.TP
Types
Connection = connection()
.br
RemoteFile = string()
.br
LocaFile = string()
.br
.RE
.RS
.LP
Fetch a file over FTP\&.
.LP
The file will be named \fILocalFile\fR on the local host\&.
.RE
.LP
.B
send(Connection, LocalFile) -> ok | {error, Reason}
.br
.RS
.LP
Send a file over FTP\&. 
.LP
The file will get the same name on the remote host\&.
.LP
\fISee also:\fR send/3\&.
.RE
.LP
.B
send(Connection, LocalFile, RemoteFile) -> ok | {error, Reason}
.br
.RS
.TP
Types
Connection = connection()
.br
LocaFile = string()
.br
RemoteFile = string()
.br
.RE
.RS
.LP
Send a file over FTP\&.
.LP
The file will be named \fIRemoteFile\fR on the remote host\&.
.RE
.LP
.B
type(Connection, Type) -> ok | {error, Reason}
.br
.RS
.TP
Types
Connection = connection()
.br
Type = ascii | binary
.br
.RE
.RS
.LP
Change file transfer type
.RE