This topic is now archived and is closed to further replies.


Dealing with disk files

Recommended Posts

  1. Search for files and display.
    In C++ you can use the fstream objects to real from and write to files. As for determining paths and if a "file" is a directory, it''s system-specific. Under Windows, look into the <direct.h> header. Under UNIX look into <unistd.h>l, <sys/dir.h> and <sys/types.h>.

  2. Obtaining file size
    A system independent way of finding file size is to use fseek and ftell (C) or fstream::seekpos (C++; inherited from basic_filebuf).

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!

Share this post

Link to post
Share on other sites