move_file_.cpp 552 B

12345678910111213141516171819202122
  1. //
  2. // $Id$
  3. //
  4. #include<__vic/fs.h>
  5. #include<__vic/windows/wchar.h>
  6. #include<__vic/windows/throw_last_error.h>
  7. #include<windows.h>
  8. namespace __vic {
  9. //----------------------------------------------------------------------------
  10. void move_file_(const char *src_path, const char *dest_path, DWORD flags)
  11. {
  12. using windows::utf8to16;
  13. if(!::MoveFileExW(utf8to16(src_path), utf8to16(dest_path), flags))
  14. windows::throw_last_error("MoveFileEx");
  15. }
  16. //----------------------------------------------------------------------------
  17. } // namespace