HTML and CSS Reference
In-Depth Information
6.2.6.3. The ftp path and typecode
The path component of an ftp URL represents a series of directories,
separated by slashes, leading to the file to be retrieved. By default,
the file is retrieved as a binary file; you can change this by adding the
typecode (and the preceding ;type= ) to the URL.
If the typecode is set to d , the path is assumed to be a directory. The
browser requests a listing of the directory contents from the server and
displays this listing to the user. If the typecode is any other letter, it is
used as a parameter to the FTP type command before retrieving the file
referenced by the path. While some FTP servers may implement other
codes, most servers accept i to initiate a binary transfer and a to treat
the file as a stream of ASCII text.
6.2.6.4. Sample ftp URLs
Here are some sample ftp URLs:
ftp://www.kumquat.com/sales/pricing
ftp://bob@bobs-box.com/results;type=d
ftp://bob:secret@bobs-box.com/listing;type=a
The first example retrieves the file named pricing from the sales dir-
ectory on the anonymous FTP server at www.kumquat.com . The second
logs into the FTP server on bobs-box.com as user bob , prompting for
a password before retrieving the contents of the directory named res-
ults and displaying them to the user. The last example logs into bobs-
box.com as bob with the password secret and retrieves the file named
listing , treating its contents as ASCII characters.
 
Search WWH ::




Custom Search