Anniepoo / swiplwebtut

A tutorial for the swipl web framework
109 stars 39 forks source link

cover http_server_files #5

Closed Anniepoo closed 8 years ago

Anniepoo commented 10 years ago

and serve_files_in_directory

(see the sources)

Anniepoo commented 8 years ago

One is an older, less capable version of the other. Jan commented on this in the mail. Dig out.

wouterbeek commented 8 years ago

My understanding is that there are the following modules:

  1. http/http_dispatch contains http_reply_file/3 which exposes a single file.
  2. http/http_dirindex provides an HTML browsing interface for the directory structure as it appears on disk. It does not expose the individual files though.
  3. http/http_files is a combination of http_reply_files/3 for files and http_dirindex for directories.
  4. http/http_server_files exposes all files in a given directory through http_reply_file/3 but does not provide an HTML overview.

To me these modules seem to be mostly complementary.

Anniepoo commented 8 years ago

documented serve_files_from_directory is older, closing