Commit 093eead8 by willmcgugan

Added httpfs to docs

parent 51b13a2d
.. automodule:: fs.httpfs
:members:
\ No newline at end of file
...@@ -38,6 +38,7 @@ Code Documentation ...@@ -38,6 +38,7 @@ Code Documentation
expose/index.rst expose/index.rst
filelike.rst filelike.rst
ftpfs.rst ftpfs.rst
httpfs.rst
memoryfs.rst memoryfs.rst
mountfs.rst mountfs.rst
multifs.rst multifs.rst
......
...@@ -12,10 +12,20 @@ from urllib2 import urlopen, URLError ...@@ -12,10 +12,20 @@ from urllib2 import urlopen, URLError
class HTTPFS(FS): class HTTPFS(FS):
"""Can barely be called a filesystem, but this enables the opener system """Can barely be called a filesystem, because HTTP servers generally don't support
to open http files""" typical filesystem functionality. This class exists to allow the :doc:`opener` system
to read files over HTTP.
def __init__(self, url): If you do need filesystem like functionality over HTTP, see :mod:`fs.contrib.davfs`.
"""
def __init__(self, url):
"""
:param url: The base URL
"""
self.root_url = url self.root_url = url
def _make_url(self, path): def _make_url(self, path):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment