<HEAD> <TITLE> read_buffer - read from a file and return a buffer </TITLE> </HEAD> <BODY BACKGROUND=http://www.imaginary.com/~beek/gifs/bg.jpg TEXT=#000000 ALINK=#FFFF00 VLINK=#550000 LINK=#000099> <center> <H1> read_buffer - read from a file and return a buffer </H1> </center> <p> <b> mixed read_buffer( mixed src, int start, int len); </b> <p> This efun is only available if DISALLOW_BUFFER_TYPE is not compiled in. <p> If 'src' is a string (filename), then the filename will be read, starting at byte # 'start', for 'len' bytes, and returned as a buffer. If neither argument is given, the entire file is read. <p> If 'src' is a buffer, then characters are read from the buffer beginning at byte # 'start' in the buffer, and for 'len' # of bytes, and returned as a string. <p> Note that the maximum number of bytes you can read from a file and into a buffer is controlled via the 'maximum byte transfer' parameter in the runtime config file. <p> See also: <A HREF=write_buffer.html> write_buffer </A>, <A HREF=allocate_buffer.html> allocate_buffer </A>, <A HREF=bufferp.html> bufferp </A>, <A HREF=../filesystem/read_bytes.html> read_bytes </A>, <A HREF=../filesystem/write_bytes.html> write_bytes </A> <p> <HR> <ADDRESS> <A HREF=http://wagner.princeton.edu/~tim> Tim Hollebeek </A> <p> <A HREF="http://www.imaginary.com/~beek/"> Beek </A>@ZorkMUD, Lima Bean, IdeaExchange, TMI-2, and elsewhere </ADDRESS>