secureswitools/swisistools/source/sisxlibrary/utility_windows.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
   183 int GetErrorValue()
   183 int GetErrorValue()
   184 	{
   184 	{
   185 	return ::GetLastError();
   185 	return ::GetLastError();
   186 	}
   186 	}
   187 
   187 
   188 int FileCopyA(const char* aSrc, const char* aDest, bool aFailIfExistsFlag)
   188 int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag)
   189 {
   189 {
   190 	// CopyFileA() returns zero on failure and non-zero otherwise.
   190 	int err=CopyFileA(aSrc,aDest,aFlag);
   191 	int err=CopyFileA(aSrc,aDest,aFailIfExistsFlag);
   191 	return err;
   192 	// To maintain consistency with the LINUX wrapper API FileCopyA() which uses cp 
       
   193 	// command with system(), we return 0 on success and 1 on failure.
       
   194 	return !err;
       
   195 }
   192 }
   196 
   193 
   197 int FileMoveA(const char* aSrc, const char* aDest)
   194 int FileMoveA(const char* aSrc, const char* aDest)
   198 {
   195 {
   199 	// MoveFileA() returns zero on failure and non-zero otherwise.
       
   200 	int err=MoveFileA(aSrc,aDest);
   196 	int err=MoveFileA(aSrc,aDest);
   201 	// To maintain consistency with the LINUX wrapper API FileMoveA() which uses mv
   197 	return err;
   202 	// command with system(), we return 0 on success and 1 on failure.
       
   203 	return !err;
       
   204 }
   198 }
   205 
   199