C fwrite equivalent in ruby

L

Lyes Amazouz

[Note: parts of this message were removed to make it a legal post.]

Hello list

I want to know if there is an equivalent to the C function fwrite in ruby.
Remeber that fwrite takes a buffer and a size of Bytes to write.

the method "write" of the File object takes only the buffer to write as a
parameter, but what I want to do is to write only an amount of bytes from
this buffer, not all the buffer.

Thank you!
 
A

ara.t.howard

Hello list

I want to know if there is an equivalent to the C function fwrite in
ruby.
Remeber that fwrite takes a buffer and a size of Bytes to write.

the method "write" of the File object takes only the buffer to write
as a
parameter, but what I want to do is to write only an amount of bytes
from
this buffer, not all the buffer.

Thank you!
--
===========
| Lyes Amazouz
| USTHB, Algiers
===========



io.write buffer[0,len]


a @ http://codeforpeople.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top