ne_get_range directly to char array buffer

Henrik Holst henrik.holst at millistream.com
Tue Apr 11 10:07:53 EDT 2017


Hi,

  you can use fileno(3) in order to get the filedescriptor from a FILE
pointer. "int fileno(FILE *stream);"

/HH

2017-04-11 15:40 GMT+02:00 Jordi Mueters <jordimueters at hotmail.com>:

> Hi all, hope someone can help me with the following.
>
> I am using ne_get_range to read part of a file on webdav.
>
> This method requires a file descriptor.
>
>
> I, however, have no interest in reading into an actual file, I want the
> content to stay in memory (preferably directly written directly into a char
> array I manage).
>
> My thinking is that I can create a pointer to a FILE using  fmemopen.
> Unfortunately fmemopen returns a FILE which does not have a file descriptor.
>
>
> The proposal is to overload ne_get_range to accept a FILE pointer instead
> of a file descriptor. This won't break any functionality because I'm sure
> everyone has to call fileno to get the filedescriptor anyways and with the
> change they don't have to anymore.
>
>
> If anyone has a more suitable solution (to read the range directly into my
> char array) please let me know.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.manyfish.co.uk/pipermail/neon/attachments/20170411/9010d525/attachment.html 


More information about the neon mailing list