Copyright © 2007 Mochi Media, Inc.
Authors: Bob Ippolito (bob@mochimedia.com).
cmd/1 | os:cmd(cmd_string(Argv)). |
cmd_port/2 | open_port({spawn, mochiweb_util:cmd_string(Argv)}, Options). |
cmd_string/1 | Create a shell quoted command string from a list of arguments. |
guess_mime/1 | Guess the mime type of a file by the extension of its filename. |
join/2 | Join a list of strings together with the given separator string or char. |
parse_header/1 | Parse a Content-Type like header, return the main Content-Type and a property list of options. |
parse_qs/1 | Parse a query string or application/x-www-form-urlencoded. |
partition/2 | Inspired by Python 2.5's str.partition: partition("foo/bar", "/") = {"foo", "/", "bar"}, partition("foo", "/") = {"foo", "", ""}. |
path_split/1 | Split a path starting from the left, as in URL traversal. |
quote_plus/1 | URL safe encoding of the given term. |
record_to_proplist/2 | calls record_to_proplist/3 with a default TypeKey of '__record'. |
record_to_proplist/3 | Return a proplist of the given Record with each field in the Fields list set as a key with the corresponding value in the Record. |
safe_relative_path/1 | Return the reduced version of a relative path or undefined if it is not safe. |
shell_quote/1 | Quote a string according to UNIX shell quoting rules, returns a string surrounded by double quotes. |
test/0 | |
unquote/1 | Unquote a URL encoded string. |
urlencode/1 | URL encode the property list. |
urlsplit/1 | Return a 5-tuple, does not expand % escapes. |
urlsplit_path/1 | Return a 3-tuple, does not expand % escapes. |
urlunsplit/1 | Assemble a URL from the 5-tuple. |
urlunsplit_path/1 | Assemble a URL path from the 3-tuple. |
cmd(Argv::[string()]) -> string()
os:cmd(cmd_string(Argv)).
cmd_port(Argv::[string()], Options) -> port()
open_port({spawn, mochiweb_util:cmd_string(Argv)}, Options).
cmd_string(Argv::[string()]) -> string()
Create a shell quoted command string from a list of arguments.
guess_mime(File::string()) -> string()
Guess the mime type of a file by the extension of its filename.
join(Strings::[string()], Separator) -> string()
Join a list of strings together with the given separator string or char.
parse_header(String::string()) -> {Type, [{K, V}]}
Parse a Content-Type like header, return the main Content-Type and a property list of options.
parse_qs(Binary::string() | binary()) -> [{Key, Value}]
Parse a query string or application/x-www-form-urlencoded.
partition(String, Sep) -> {String, [], []} | {Prefix, Sep, Postfix}
Inspired by Python 2.5's str.partition: partition("foo/bar", "/") = {"foo", "/", "bar"}, partition("foo", "/") = {"foo", "", ""}.
path_split(S::string()) -> {Part, Rest}
Split a path starting from the left, as in URL traversal. path_split("foo/bar") = {"foo", "bar"}, path_split("/foo/bar") = {"", "foo/bar"}.
quote_plus(Atom::atom() | integer() | string()) -> string()
URL safe encoding of the given term.
record_to_proplist(Record, Fields) -> proplist()
calls record_to_proplist/3 with a default TypeKey of '__record'
record_to_proplist(Record, Fields, TypeKey) -> proplist()
Return a proplist of the given Record with each field in the Fields list set as a key with the corresponding value in the Record. TypeKey is the key that is used to store the record type Fields should be obtained by calling record_info(fields, record_type) where record_type is the record type of Record
safe_relative_path(P::string()) -> string() | undefined
Return the reduced version of a relative path or undefined if it is not safe. safe relative paths can be joined with an absolute path and will result in a subdirectory of the absolute path.
shell_quote(L::string()) -> string()
Quote a string according to UNIX shell quoting rules, returns a string surrounded by double quotes.
test() -> any()
unquote(Binary::string() | binary()) -> string()
Unquote a URL encoded string.
urlencode(Props::[{Key, Value}]) -> string()
URL encode the property list.
urlsplit(Url) -> {Scheme, Netloc, Path, Query, Fragment}
Return a 5-tuple, does not expand % escapes. Only supports HTTP style URLs.
urlsplit_path(Path::Url) -> {Path, Query, Fragment}
Return a 3-tuple, does not expand % escapes. Only supports HTTP style paths.
urlunsplit(X1::{Scheme, Netloc, Path, Query, Fragment}) -> string()
Assemble a URL from the 5-tuple. Path must be absolute.
urlunsplit_path(X1::{Path, Query, Fragment}) -> string()
Assemble a URL path from the 3-tuple.
Generated by EDoc, Aug 8 2008, 22:08:50.