Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 File manipulation in C++
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
1of42




PostPosted: 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
Sponsor
sponsor
Mazer




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: