Posted: Fri Apr 01, 2005 1:04 pm Post subject: File manipulation in C++
Are there any built-in libraries or classes for manipulating files in C++? I'm looking for something analagous to the Java File class.
Note: I do not mean libraries for file I/O... I'm looking for functions/libraries that will enable me to move functions around, create directories, move directories, etc etc etc...
Sponsor Sponsor
Mazer
Posted: Fri Apr 01, 2005 1:12 pm Post subject: (No subject)
Not standard, no, but there is a Boost library available. I've used it before, it works.
OMouse
Posted: Wed Apr 06, 2005 6:22 pm Post subject: (No subject)
Umm. You can always use system() to execute any commands you might need.
There may be an API for windows that lets you create directories with a function call, I know there's one for Visual Basic.
-OMouse
Martin
Posted: Wed Apr 06, 2005 9:26 pm Post subject: (No subject)
Avoid system calls like the plague. They'll only ever cause you problems later when stuff changes (and any chance of platform independance gets shot to hell).
OMouse
Posted: Thu Apr 07, 2005 7:18 pm Post subject: (No subject)
The commands for creating new directories is the same in *NIX and DOS i believe. And you only have to switch two times even if it is different. Once to check for windows and once to check for some *nix distro.
Not that difficult.
wtd
Posted: Thu Apr 07, 2005 7:30 pm Post subject: (No subject)
OMouse wrote:
The commands for creating new directories is the same in *NIX and DOS i believe. And you only have to switch two times even if it is different. Once to check for windows and once to check for some *nix distro.
Not that difficult.
Very fragile, though. The boost libraries are a far better solution.