Jump to content
  • Advertisement
Sign in to follow this  
fuzinavl

POST your favorite FILE i/o methods

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What are your favorite (considerations: speed, ease of use) libraries / functions for: (C or C++, indicate platform) datafile i/o? textfile i/o?

Share this post


Link to post
Share on other sites
Advertisement
Ehm...fstream in C++, and most other languages are pretty orthogonal with file IO.

As far as file formats, I personally tend to drift towards binary formats for anything that can't easily be written by hand (for example a mesh file). For things that are easily written or modified by hand, XML is usually my favorite. I don't particularly like normal text files, mainly because I hate writing parsers.

Share this post


Link to post
Share on other sites
It depends a little on if which kind of files I'm working on and the project's portability requirements, but memory mapped files are very comfortable to work with when used fully.

I also have a weird fascination with writing parsers manually, and parsing techniques in general..
There's quite a few dedicated parser languages on various scopes. So I recommend learning about regexps, lex and yacc if you intend to work with text files.

Share this post


Link to post
Share on other sites
Real men use the Win32 (or equivalent) API straight, none of this fancy-schmancy 'standard' stuff [grin]

Na, I wrote my own I/O streams, and use them religiously.

Share this post


Link to post
Share on other sites
Hmm, I/O on my operating system is somewhat limited due to the as-yet lack of a driver for any filesystem.

For the basics, I'm quite fond of Visual Basic .NET 2005's My.Computer.* stuff for filesytem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!