Files
Client/Tools/PatchCommon/FileEnumerator.cpp
LGram16 e067522598 Initial commit: ROW Client source code
Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:24:34 +09:00

116 lines
2.4 KiB
C++

// FileEnumerator.cpp: implementation of the CFileEnumerator class.
//
//////////////////////////////////////////////////////////////////////
#include "FileEnumerator.h"
#include <string>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CFileEnumerator::CFileEnumerator()
{
m_szRootPath[0] = 0;
}
CFileEnumerator::~CFileEnumerator()
{
Clear();
}
void CFileEnumerator::Clear()
{
m_szRootPath[0] = 0;
for( int i = 0; i < m_vecEnumeratedFiles.size(); ++i )
{
SAFE_DELETEA( m_vecEnumeratedFiles[i] );
}
}
const char* CFileEnumerator::GetRootPath()
{
return m_szRootPath;
}
bool CFileEnumerator::Enumerate( const char* szRootPath )
{
Clear();
// if( false == IsDirectoryExist( szRootPath ) )
// {
// return false;
// }
//
// strcpy( m_szRootPath, szRootPath );
//
// char szTmp[MAX_PATH];
//
// WIN32_FIND_DATA w32fd;
//
// wsprintf( szTmp, "%s\\*.*", m_szRootPath );
// HANDLE hFind = FindFirstFile( szTmp, &w32fd );
//
// if( INVALID_HANDLE_VALUE == hFind )
// {
// return false;
// }
//
//
// std::string strCurrentSubPath("");
// std::vector< std::string > vecSubDirList;
//
// while(1)
// {
// if( w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
// {
// if( 0 == stricmp( ".", w32fd.cFileName ) ||
// 0 == stricmp( "..", w32fd.cFileName ) )
// {
// continue;
// }
//
// wsprintf( szTmp, "%s%s", strCurrentSubPath.c_str(), w32fd.cFileName );
//
// m_vecSubPathName.push_back( w32fd.cFileName );
//
//
//
// CString strTmp;
// strTmp.Format( "%s%s", strCurrentSubPath, w32fd.cFileName );
// if( !IsExcludedSubDir( strTmp ) )
// {
// astrSubDirList.Add( strTmp );
// }
// }
// else
// {
// FilePatchInfoRecord fpir;
//
//
// strcpy( fpir.szFileName, strCurrentSubPath+w32fd.cFileName );
// CString strFullPathName = m_strLocalFilePath+strCurrentSubPath+w32fd.cFileName;
//
// m_strStateInfoString.Format( "»õ ¹öÀüÀÇ %s ÆÄÀÏÀ» °Ë»çÁß", strFullPathName );
//
// CCrc32Static::FileCrc32Assembly( strFullPathName, fpir.dwCRC32 );
// HANDLE hFile = CreateFile( strFullPathName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
// NULL, OPEN_EXISTING, 0, 0 );
// fpir.dwSize = GetFileSize ( hFile, NULL );
// CloseHandle( hFile );
//
// m_LocalPatchInfo.GetList().Add( fpir );
// }
//
// }
return true;
}