Re: system() help
- Posted by gbonvehi Aug 15, 2008
- 1467 views
jeremy said...
I hate to say this, but maybe you need it for 3.x, but 4.0 standard library has the functions:
- file_exists
- copy_file
- rename_file
- delete_file
- move_file
- create_directory
- remove_directory
- clear_directory -- remove dir recursively
You can look at how they are implemented via the URL:
http://rapideuphoria.svn.sourceforge.net/svnroot/rapideuphoria/trunk/include/std/filesys.e
Jeremy
I'm glad to hear that :) The only problem with remove_directory (WIN32) there, is that it just calls remove directory API function which doesn't delete a directory if it's not empty.
ghaberek said...
The thing about SHFileOperation is that it acts just as if you were performing the operation yourself. So if you FO_DELETE a directory, the whole thing gets deleted automatically. You could also include FOF_ALLOWUNDO to allow the user to reverse your operation, should they be so inclined.
-Greg
Even cooler :)