Changeset 22 in dev for ProjectEditor/FileOperation.cpp
- Timestamp:
- Dec 29, 2006, 1:55:55 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ProjectEditor/FileOperation.cpp
r3 r22 172 172 } 173 173 174 void RemoveDirectoryStrong(c har *dir_path){174 void RemoveDirectoryStrong(const char *dir_path){ 175 175 HANDLE hFind; 176 176 WIN32_FIND_DATA wfd; … … 410 410 } 411 411 412 if(!Is File(temporary)){412 if(!IsExistFile(temporary)){ 413 413 //保存先ファイルが存在しないとき 414 414 char temp2[MAX_PATH]; … … 566 566 } 567 567 568 BOOL IsFile(char *path){568 bool IsExistFile( const char *FilePath ){ 569 569 WIN32_FIND_DATA wfd; 570 570 HANDLE hFind; 571 571 572 hFind=FindFirstFile(path,&wfd); 573 if(hFind==INVALID_HANDLE_VALUE){ 574 return 0; 575 } 576 FindClose(hFind); 577 578 return 1; 579 } 572 hFind = FindFirstFile(FilePath,&wfd); 573 if( hFind == INVALID_HANDLE_VALUE ){ 574 return false; 575 } 576 FindClose( hFind ); 577 578 return true; 579 } 580 581 bool IsExistDirectory( const char *DirPath ){ 582 WIN32_FIND_DATA wfd; 583 HANDLE hFind; 584 585 hFind = FindFirstFile(DirPath,&wfd); 586 if( hFind == INVALID_HANDLE_VALUE ){ 587 //存在しない 588 return false; 589 } 590 FindClose( hFind ); 591 592 if( wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ){ 593 //ディレクトリの場合 594 return true; 595 } 596 597 //存在しない 598 return false; 599 }
Note:
See TracChangeset
for help on using the changeset viewer.