Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/lib/sysdep/os/win/wposix/wfilesystem.cpp
/* Copyright (C) 2010 Wildfire Games. | /* Copyright (C) 2021 Wildfire Games. | ||||
* | * | ||||
* Permission is hereby granted, free of charge, to any person obtaining | * Permission is hereby granted, free of charge, to any person obtaining | ||||
* a copy of this software and associated documentation files (the | * a copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | * "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | * without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sublicense, and/or sell copies of the Software, and to | * distribute, sublicense, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | * permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | * the following conditions: | ||||
▲ Show 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | |||||
int wrmdir(const OsPath& path) | int wrmdir(const OsPath& path) | ||||
{ | { | ||||
return _wrmdir(OsString(path).c_str()); | return _wrmdir(OsString(path).c_str()); | ||||
} | } | ||||
int wrename(const OsPath& pathnameOld, const OsPath& pathnameNew) | |||||
{ | |||||
return _wrename(OsString(pathnameOld).c_str(), OsString(pathnameNew).c_str()); | |||||
} | |||||
OsPath wrealpath(const OsPath& pathname) | OsPath wrealpath(const OsPath& pathname) | ||||
{ | { | ||||
wchar_t resolved[PATH_MAX]; | wchar_t resolved[PATH_MAX]; | ||||
if(!GetFullPathNameW(OsString(pathname).c_str(), PATH_MAX, resolved, 0)) | if(!GetFullPathNameW(OsString(pathname).c_str(), PATH_MAX, resolved, 0)) | ||||
return OsPath(); | return OsPath(); | ||||
return resolved; | return resolved; | ||||
} | } | ||||
Show All 36 Lines |
Wildfire Games · Phabricator