wxRmdir()

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
prokicki
Knows some wx things
Knows some wx things
Posts: 47
Joined: Fri Jan 21, 2005 9:53 am
Contact:

wxRmdir()

Post by prokicki »

How can I delete a whole directory with its contents, number of files and
directories unknown? The wxRmdir() function cannot handle it, it deletes
empty directories only.

P.
forum C++ in polish
cpp.g5.pl
User avatar
Ryan Norton
wxWorld Domination!
wxWorld Domination!
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Re: wxRmdir()

Post by Ryan Norton »

prokicki wrote:How can I delete a whole directory with its contents, number of files and
directories unknown? The wxRmdir() function cannot handle it, it deletes
empty directories only.

P.
Maybe wxFileName::Rmdir works? I doubt it but its worth a try...
[Mostly retired moderator, still check in to clean up some stuff]
prokicki
Knows some wx things
Knows some wx things
Posts: 47
Joined: Fri Jan 21, 2005 9:53 am
Contact:

Re: wxRmdir()

Post by prokicki »

Ryan Norton wrote: Maybe wxFileName::Rmdir works? .
no :-(

P.
forum C++ in polish
cpp.g5.pl
vdell
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 536
Joined: Fri Jan 07, 2005 3:44 pm
Location: Finland
Contact:

Post by vdell »

Delete every file individually and use wxRmdir after that. You can use wxDir::GetAllFiles to get the content of the directory.
Visual C++ 9.0 / Windows XP Pro SP3 / wxWidgets 2.9.0 (SVN) | Colligere
Post Reply