#include <boost/filesystem.hpp>

 

 

// full_path가  D:\svn\MasterChronicleDev\test.exe 일때

boost::filesystem::path path( full_path ); 

 

 

// 확장자 없는 파일네임만 리턴  ( "test.exe" )

std::string only_filename = path.stem();         

 

 // 확장자 포함 파일 네임        ( "test" )

std::string filename = path.filename();           

 

// 파일네임 없는 path만 리턴    ( "D:\svn\MasterChronicleDev" )

std::string path = path.parent_path().string(); 

 

// 확장자 리턴 ( ".exe" )

std::string ext = path.extention();

 

// full path 리턴 ( "D:\svn\MasterChronicleDev\test.exe" )

std::string full_path = path.string();   


,