https://github.com/curl/fcurl
fcurl - fopen, fread, fwrite style functions for URL operations using libcurl
https://github.com/curl/fcurl
fopen libcurl
Last synced: 5 months ago
JSON representation
fcurl - fopen, fread, fwrite style functions for URL operations using libcurl
- Host: GitHub
- URL: https://github.com/curl/fcurl
- Owner: curl
- License: mit
- Created: 2016-04-22T12:17:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-15T18:38:55.000Z (over 2 years ago)
- Last Synced: 2024-10-29T15:32:25.499Z (8 months ago)
- Topics: fopen, libcurl
- Language: C
- Size: 13.7 KB
- Stars: 37
- Watchers: 13
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fcurl
The fopen, fread, fwrite et all functions are common and a standard "idiom" in
many C programs.By providing fcurl* functions with the same general behavior as the file based
versions, but instead allowing URLs where file names are otherwise used, this
is an attempt to allow existing file-based applications to switch over to read
and write files over common internet protocols instead.## API
Maybe something like this?
FCURL *fcurl_open(const char *path, const char *mode);
size_t fcurl_read(void *ptr, size_t size, size_t nmemb, FCURL *stream);
size_t fcurl_write(const void *ptr, size_t size, size_t nmemb,
FCURL *stream);int fcurl_flush(FCURL *stream);
int fcurl_close(FCURL *stream);
int fcurl_getc(FCURL *stream);
char *fcurl_gets(char *s, int size, FCURL *stream);
int fcurl_ungetc(int c, FCURL *stream);
int fcurl_seek(FCURL *stream, long offset, int whence);
long fcurl_tell(FCURL *stream);
void fcurl_rewind(FCURL *stream);
int fcurl_getpos(FCURL *stream, fpos_t *pos);
int fcurl_setpos(FCURL *stream, const fpos_t *pos);