summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fxcrt_posix.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 17:38:11 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 17:38:11 -0700
commitca3ac5e9ffc936066267fbb1c329e5297d8e23e6 (patch)
tree986e666023ae0eec649051613d83c6c60ef3dac0 /core/src/fxcrt/fxcrt_posix.cpp
parent0aa0e7331b3512066df3e33d6642456a0de63de7 (diff)
downloadpdfium-ca3ac5e9ffc936066267fbb1c329e5297d8e23e6.tar.xz
Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.
Nearly automatic merge + re-run script on new files. Original Review URL: https://codereview.chromium.org/1180593004. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1174303002.
Diffstat (limited to 'core/src/fxcrt/fxcrt_posix.cpp')
-rw-r--r--core/src/fxcrt/fxcrt_posix.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index dd2aaf27d0..da39f8cd5e 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -33,7 +33,7 @@ CFXCRT_FileAccess_Posix::~CFXCRT_FileAccess_Posix()
{
Close();
}
-FX_BOOL CFXCRT_FileAccess_Posix::Open(FX_BSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_Posix::Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode)
{
if (m_nFD > -1) {
return FALSE;
@@ -43,7 +43,7 @@ FX_BOOL CFXCRT_FileAccess_Posix::Open(FX_BSTR fileName, FX_DWORD dwMode)
m_nFD = open(fileName.GetCStr(), nFlags, nMasks);
return m_nFD > -1;
}
-FX_BOOL CFXCRT_FileAccess_Posix::Open(FX_WSTR fileName, FX_DWORD dwMode)
+FX_BOOL CFXCRT_FileAccess_Posix::Open(const CFX_WideStringC& fileName, FX_DWORD dwMode)
{
return Open(FX_UTF8Encode(fileName), dwMode);
}
@@ -134,23 +134,23 @@ FX_BOOL CFXCRT_FileAccess_Posix::Truncate(FX_FILESIZE szFile)
}
return !ftruncate(m_nFD, szFile);
}
-FX_BOOL FX_File_Exist(FX_BSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName)
{
return access(fileName.GetCStr(), F_OK) > -1;
}
-FX_BOOL FX_File_Exist(FX_WSTR fileName)
+FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName)
{
return FX_File_Exist(FX_UTF8Encode(fileName));
}
-FX_BOOL FX_File_Delete(FX_BSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName)
{
return remove(fileName.GetCStr()) > -1;
}
-FX_BOOL FX_File_Delete(FX_WSTR fileName)
+FX_BOOL FX_File_Delete(const CFX_WideStringC& fileName)
{
return FX_File_Delete(FX_UTF8Encode(fileName));
}
-FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
CFXCRT_FileAccess_Posix src, dst;
if (!src.Open(fileNameSrc, FX_FILEMODE_ReadOnly)) {
@@ -175,15 +175,15 @@ FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
FX_Free(pBuffer);
return TRUE;
}
-FX_BOOL FX_File_Copy(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return FX_File_Copy(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
}
-FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst)
{
return rename(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
}
-FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
+FX_BOOL FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst)
{
return FX_File_Move(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
}