parent
9e79ae539b
commit
6931d70e6e
Notes:
git
2022-01-11 06:14:57 +09:00
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
46
io.c
46
io.c
@ -5575,15 +5575,13 @@ rb_io_close_write(VALUE io)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* ios.sysseek(offset, whence=IO::SEEK_SET) -> integer
|
* sysseek(offset, whence = IO::SEEK_SET) -> integer
|
||||||
*
|
*
|
||||||
* Seeks to a given <i>offset</i> in the stream according to the value
|
* Behaves like IO#seek, except that it:
|
||||||
* of <i>whence</i> (see IO#seek for values of <i>whence</i>). Returns
|
*
|
||||||
* the new offset into the file.
|
* - Uses low-level system functions.
|
||||||
|
* - Returns the new position.
|
||||||
*
|
*
|
||||||
* f = File.new("testfile")
|
|
||||||
* f.sysseek(-13, IO::SEEK_END) #=> 53
|
|
||||||
* f.sysread(10) #=> "And so on."
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -5615,15 +5613,19 @@ rb_io_sysseek(int argc, VALUE *argv, VALUE io)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* ios.syswrite(string) -> integer
|
* syswrite(object) -> integer
|
||||||
*
|
*
|
||||||
* Writes the given string to <em>ios</em> using a low-level write.
|
* Writes the given +object+ to self, which must be opened for writing (see Modes);
|
||||||
* Returns the number of bytes written. Do not mix with other methods
|
* returns the number bytes written.
|
||||||
* that write to <em>ios</em> or you may get unpredictable results.
|
* If +object+ is not a string is converted via method to_s:
|
||||||
* Raises SystemCallError on error.
|
*
|
||||||
|
* f = File.new('t.tmp', 'w')
|
||||||
|
* f.syswrite('foo') # => 3
|
||||||
|
* f.syswrite(30) # => 2
|
||||||
|
* f.syswrite(:foo) # => 3
|
||||||
|
*
|
||||||
|
* This methods should not be used with other stream-writer methods.
|
||||||
*
|
*
|
||||||
* f = File.new("out", "w")
|
|
||||||
* f.syswrite("ABCDEF") #=> 6
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -5656,21 +5658,13 @@ rb_io_syswrite(VALUE io, VALUE str)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* ios.sysread(maxlen[, outbuf]) -> string
|
* sysread(maxlen) -> string
|
||||||
|
* sysread(maxlen, out_string) -> string
|
||||||
*
|
*
|
||||||
* Reads <i>maxlen</i> bytes from <em>ios</em> using a low-level
|
* Behaves like IO#readpartial, except that it uses low-level system functions.
|
||||||
* read and returns them as a string. Do not mix with other methods
|
|
||||||
* that read from <em>ios</em> or you may get unpredictable results.
|
|
||||||
*
|
*
|
||||||
* If the optional _outbuf_ argument is present,
|
* This method should not be used with other stream-reader methods.
|
||||||
* it must reference a String, which will receive the data.
|
|
||||||
* The _outbuf_ will contain only the received data after the method call
|
|
||||||
* even if it is not empty at the beginning.
|
|
||||||
*
|
*
|
||||||
* Raises SystemCallError on error and EOFError at end of file.
|
|
||||||
*
|
|
||||||
* f = File.new("testfile")
|
|
||||||
* f.sysread(16) #=> "This is line one"
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user