ファイル名として使えるかどうかを判定
ファイル名として有効かどうかを判定する関数が見つからない。
PathXXXX系関数があると思ったけど…
仕方ないので、とりあえず、自作。
\ / : * ? " < > |
bool IsValidPathName(const std::string& name) { for( size_t i=0 ; i<name.size() ; ++i ) { UINT status = PathGetCharType(name[i]); if( status == GCT_INVALID || status & GCT_SEPARATOR || status & GCT_WILD ) return false; } return true; }