[Mono-list] working with files

Jonathan Pryor jonpryor at vt.edu
Fri Apr 18 10:03:54 EDT 2008


On Thu, 2008-04-17 at 21:07 -0400, Bismark Castilla Monzon wrote:
> Hi, i’m programming an application, and i need to work with fopen and
> fwrite , but i don't understand Official Documentation very well, i
> tried with google and nothing interesting, can somebody give me a
> clue?

Do you need to use normal file I/O?  If so, then System.IO.FileStream
and System.IO.TextReader/System.IO.TextWriter should suffice.

Or do you need to use the real fopen/fwrite calls, e.g. for
compatibility/interop with another app?  If so, there's
Mono.Unix.Native.Stdlib.fopen(), Mono.Unix.Native.Stdlib.fwrite(), and
Mono.Unix.StdioFileStream, all in Mono.Posix.dll:

http://www.go-mono.com/docs/index.aspx?tlink=0@ecma%3a151%23Stdlib%2fM%2f13
http://www.go-mono.com/docs/index.aspx?tlink=0@ecma%3a151%23Stdlib%2fM%2ffwrite
http://www.go-mono.com/docs/index.aspx?tlink=0@ecma%3a96%23StdioFileStream%2f

 - Jon




More information about the Mono-list mailing list