move DirectoryIsEmpty to RageUtil

cleanup
add join( Delimitor, iterator, iterator )
This commit is contained in:
Glenn Maynard
2003-12-07 22:54:50 +00:00
parent 96a7ebe210
commit 5f6fedfcda
3 changed files with 48 additions and 35 deletions
-14
View File
@@ -22,20 +22,6 @@ AnnouncerManager* ANNOUNCER = NULL; // global object accessable from anywhere in
const CString EMPTY_ANNOUNCER_NAME = "Empty";
const CString ANNOUNCERS_DIR = BASE_PATH "Announcers" SLASH;
/* XXX: move to RageUtil when I feel like spending 20 minutes recompiling */
/* Return true if "dir" is empty or does not exist. */
static bool DirectoryIsEmpty( CString dir )
{
if(dir == "")
return true;
if(!DoesFileExist(dir))
return true;
CStringArray asFileNames;
GetDirListing( dir, asFileNames );
return asFileNames.empty();
}
AnnouncerManager::AnnouncerManager()
{
LOG->Trace("AnnouncerManager::AnnouncerManager()");