rename_file.cpp 629 B

12345678910111213141516171819202122232425
  1. //
  2. // $Id$
  3. //
  4. #include<__vic/fs.h>
  5. #include<windows.h>
  6. namespace __vic {
  7. void move_file_(const char * , const char * , DWORD );
  8. //----------------------------------------------------------------------------
  9. void rename_file(const char *src_path, const char *dest_path)
  10. {
  11. move_file_(src_path, dest_path, 0);
  12. }
  13. //----------------------------------------------------------------------------
  14. void rename_file_replace(const char *src_path, const char *dest_path)
  15. {
  16. move_file_(src_path, dest_path, MOVEFILE_REPLACE_EXISTING);
  17. }
  18. //----------------------------------------------------------------------------
  19. } // namespace