EgtGeneral :
- aggiunta funzione EraseNonEmptyDirectory.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "\EgtDev\Include\EGnStringUtils.h"
|
||||
#include "\EgtDev\Include\EgtStringConverter.h"
|
||||
#include <io.h>
|
||||
#include <filesystem>
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -297,6 +298,16 @@ EraseDirectory( const string& sDir)
|
||||
return( ::RemoveDirectoryW( sDirW.c_str()) != FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
EraseNonEmptyDirectory( const string& sDir)
|
||||
{
|
||||
wstring sDirW = stringtoW( sDir) ;
|
||||
error_code Ec ;
|
||||
uintmax_t nRes = filesystem::remove_all( sDirW, Ec) ;
|
||||
return ( nRes > 0) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
FindAllDirectories( const string& sDirSpec, STRVECTOR& vsDirNames)
|
||||
|
||||
Reference in New Issue
Block a user