예제 #1
0
void bearlib::CopyFiles( const boost::filesystem::path& from, const boost::filesystem::path& to )
{
	++g_iHierarchy;

	if( !boost::filesystem::exists(to) )
	{
		boost::filesystem::create_directories( to );
	}    

	boost::filesystem::directory_iterator end;

	for( boost::filesystem::directory_iterator it(from); it != end; ++it )
	{
		boost::filesystem::path newFrom = from;		
		newFrom /= it->path().filename();	
		boost::filesystem::path newTo = to;
		newTo /= it->path().filename();	

		if( boost::filesystem::is_directory( newFrom ) )
		{
			AppendSpace();
		//	cout<<"Copy Directory [" << newFrom.filename() <<"] to ["<< newTo.filename() <<"]" << endl;
			CopyFiles( newFrom, newTo );
		}
		else if( boost::filesystem::is_regular( newFrom ) )
		{
			AppendSpace();
		//	cout<<"Copy File ["<< newFrom.filename() <<"] to ["<< newTo.filename() << "]" << endl;
			boost::filesystem::copy_file( newFrom, newTo, boost::filesystem::copy_option::overwrite_if_exists );
		}
	}

	--g_iHierarchy;
}
예제 #2
0
// 문자열에 @flyff.jp를 붙인다.
void AppendEndMark( LPTSTR lpszDst, LPCTSTR szSrc, size_t length )
{
	static char szEndMark[] = "@flyff.jp";

	char* p = StrCpyExcludeNull( lpszDst, szSrc );
	memcpy( p, szEndMark, ENDMARK_LENGTH );
	p += ENDMARK_LENGTH;

	AppendSpace( p, lpszDst + length );
}
예제 #3
0
// 과금정보 REQ
void CDPBilling::SendGameStart( LPCTSTR lpszUserID, LPCTSTR lpszUserIP )
{
	OutputDebugString("send 0x00000001 - GAME_START\n");

	char cbUserID[MAX_ID_LENGTH];
	char cbUserIP[MAX_IP_LENGTH];

	AppendEndMark( cbUserID, lpszUserID, MAX_ID_LENGTH );
	char* p = StrCpyExcludeNull( cbUserIP, lpszUserIP );
	AppendSpace( p, cbUserIP + MAX_IP_LENGTH );

	CAr	ar;
	int nBufSize;
	ar << htonl( static_cast<DWORD>(GAME_START_SEND) );
	ar.Write( cbUserID, MAX_ID_LENGTH );
	ar.Write( cbUserIP, MAX_IP_LENGTH );
	SEND( ar, this, DPID_SERVERPLAYER );
}