Files
envi-code/SourceCode/Code2026/tg_shs/shs_TwtKernal/XFilePathName.cpp
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

54 lines
1.0 KiB
C++

// XFilePathName.cpp: implementation of the XFilePathName class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "XFilePathName.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
XFilePathName::XFilePathName()
{
m_sPathName=_T("");
m_sDriver=_T("");
m_sDir=_T("");
m_sFileName=_T("");
m_sFileExt=_T("");
}
XFilePathName::XFilePathName(LPCTSTR lpStr)
{
m_sPathName=lpStr;
splitMe();
}
XFilePathName::~XFilePathName()
{
}
void XFilePathName::splitMe()
{
TCHAR drive[_MAX_DRIVE]=_T(""), dir[_MAX_DIR]=_T(""), fname[_MAX_FNAME]=_T(""), ext[_MAX_EXT]=_T("");
_tsplitpath((LPCTSTR)m_sPathName, drive, dir, fname, ext);
m_sDriver=drive;
m_sDir=dir;
m_sFileName=fname;
m_sFileExt=ext;
}
BOOL XFilePathName::setPathName(LPCTSTR lpStr)
{
m_sPathName=lpStr;
splitMe();
return TRUE;
}