pike.git / src / modules / _Stdio / file.c

version» Context lines:

pike.git/src/modules/_Stdio/file.c:1294:    *! @note    *! When at the end of a file or stream, repeated calls to @[read()]    *! will return the empty string since it's not considered an error.    *! The empty string is never returned in other cases, unless nonblocking    *! mode is used or @[len] is zero.    *!    *! @seealso    *! @[read_oob()], @[write()], @[receive_fd()], @[send_fd()]    */    - /*! -  *! @decl int read(Stdio.Buffer|String.Buffer dst) + /*! @decl int read(Stdio.Buffer|String.Buffer dst)    *!    *! Reads data from a file or stream into the buffer @[dst]. Tries to    *! read as many bytes as buffer space available.    *! Will advance the write position in @[dst] by the number of bytes    *! read.    *!    *! @returns    *! The number of bytes read. Returns @expr{-1@} on error and    *! @[errno()] will return the corresponding error code.    */    - /*! -  *! @decl int read(System.Memory dst, void|int(0..) offset) + /*! @decl int read(System.Memory dst, void|int(0..) offset)    *!    *! Reads data from a file or stream into the buffer @[dst] at offset    *! @[offset]. Tries to read as many bytes as buffer space available.    *!    *! @returns    *! The number of bytes read. Returns @expr{-1@} on error and    *! @[errno()] will return the corresponding error code.    */   static void file_read(INT32 args)   {