man http_parseFilename (Fonctions bibliothèques) - Takes a URL and parses out the filename from it.

NAME

http_parseFilename - Takes a URL and parses out the filename from it.

SYNOPSIS

#include <http_fetcher.h>

int http_parseFilename(const char *url, char **filename);

DESCRIPTION

Takes a URL and determines the filename at the end of it. If there is one, memory is allocated to hold the string and is pointed to by filename.

For example, in "http://www.foo.com/bar/fubar.html" the filename would be "fubar.html".

RETURN VALUE

Returns 0 on success.

Returns 1 when there is no end filename, for instance "www.foo.com" or "www.bar.org/" in which case filename should NOT be assumed to be a valid pointer.

On error, -1 is returned, and http_perror can be used to print an informative error message. http_strerror can be used to get a pointer to the current error description message.

SEE ALSO