diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-29 16:26:15 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-29 16:26:46 +0100 |
commit | 84346cd178ca0740817edc6f81d8f90e7bc6e00c (patch) | |
tree | dd8f6dbb041a2813ac5d91571cdac0b3dc004f1a /modules/luci-base/luasrc/http/protocol/mime.luadoc | |
parent | cf7e2695cc676dff02561a1a45d6de8140170b17 (diff) |
Move inline documentation into separate files.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/luasrc/http/protocol/mime.luadoc')
-rw-r--r-- | modules/luci-base/luasrc/http/protocol/mime.luadoc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/http/protocol/mime.luadoc b/modules/luci-base/luasrc/http/protocol/mime.luadoc new file mode 100644 index 0000000000..195b5fcc89 --- /dev/null +++ b/modules/luci-base/luasrc/http/protocol/mime.luadoc @@ -0,0 +1,34 @@ +---[[ +LuCI http protocol implementation - mime helper class. + +This class provides functions to guess mime types from file extensions and +vice versa. +]] +module "luci.http.protocol.mime" + +---[[ +MIME mapping table containg extension - mimetype relations. + +@class table +]] + +---[[ +Extract extension from a filename and return corresponding mime-type or + +"application/octet-stream" if the extension is unknown. +@class function +@name to_mime +@param filename The filename for which the mime type is guessed +@return String containign the determined mime type +]] + +---[[ +Return corresponding extension for a given mime type or nil if the + +given mime-type is unknown. +@class function +@name to_ext +@param mimetype The mimetype to retrieve the extension from +@return String with the extension or nil for unknown type +]] + |