LWN.net Logo

Library function please?

Library function please?

Posted Mar 17, 2009 21:35 UTC (Tue) by dmarti (subscriber, #11625)
Parent article: Better than POSIX?

Can we have a "write-data-to-file" library function to do this stuff?

Pass it a pathname, a pointer to a block of data, a length, and some flags, and it comes back with success if it opened, wrote, did whatever black magic you have to do, and closed the file.

The library could also include the corresponding read function, so you could have a flag to tell the writer, "don't bother rewriting with identical contents."


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds