refactor file interface. requires workspace update

- separate file_system_util into vfs functions (-> vfs/vfs_util) and
file_system (avoids ugly fs_util namespace prefix)
- get rid of non-portable O_BINARY_NP etc. flags
- use standard O_WRONLY etc. flags instead of LIO_WRITE; but avoid the
need for specifying O_CREAT|O_TRUNC
- only open files for aio when O_DIRECT is specified (which 0ad does
not) - avoids wasting time and security issues
- return file descriptor directly instead of via output param
- waio: safer FCB mechanism that avoids mixing descriptors between lowio
and aio

This was SVN commit r9550.
This commit is contained in:
janwas
2011-05-25 10:39:13 +00:00
parent ceea205782
commit 34186dd017
32 changed files with 394 additions and 360 deletions
+2 -2
View File
@@ -825,7 +825,7 @@ bool ScriptInterface::LoadGlobalScript(const VfsPath& filename, const std::wstri
bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
{
if (!VfsFileExists(g_VFS, path))
if (!VfsFileExists(path))
{
LOGERROR(L"File '%ls' does not exist", path.string().c_str());
return false;
@@ -911,7 +911,7 @@ CScriptValRooted ScriptInterface::ParseJSON(const std::string& string_utf8)
CScriptValRooted ScriptInterface::ReadJSONFile(const VfsPath& path)
{
if (!VfsFileExists(g_VFS, path))
if (!VfsFileExists(path))
{
LOGERROR(L"File '%ls' does not exist", path.string().c_str());
return CScriptValRooted();