I/O drivers
The mmhttp module publishes the url driver with which a URL can be used as a file. Thanks to this facility it is possible to use files stored on an HTTP enabled file server just as if they were located on the local file system. For example, the following command downloads and executes the Mosel file "hello.mos" stored on the web server mysrv:
> mosel exec mmhttp.url:http://mysrv/hello.mos
Driver url
url:URL
The file name for this driver is a URL. Currently only HTTP URLs are supported (i.e. the name must begin with "http://"). The behaviour of the driver depends on the file operation:
- reading
- A GET request is sent to the specified URL at the time of opening the file. The following read operations are executed directly from the result stream generated by the server.
- writing
- The written data is first saved into a temporary file and then sent to the specified URL via a PUT request when the file is closed.
- deleting
- When deleting a file ( e.g., using fdelete) through this driver a DELETE request is sent to the specified URL.