summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fxcrt_posix.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-08 14:57:48 -0800
committerLei Zhang <thestig@chromium.org>2016-01-08 14:57:48 -0800
commitb8e1ab27372cdb5d8c83e57e004032f0d72715db (patch)
tree718888980718f0b0f5e8d283f91713bdb0712c70 /core/src/fxcrt/fxcrt_posix.cpp
parent111d8db83ac04d15bd8d879e7dad4651ee8e27e9 (diff)
downloadpdfium-b8e1ab27372cdb5d8c83e57e004032f0d72715db.tar.xz
Merge to XFA: Remove a bunch of dead code.
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567333003 . (cherry picked from commit 4a24ad858484ecdf9b49481e63060e4d476cf1c7) Review URL: https://codereview.chromium.org/1569783007 .
Diffstat (limited to 'core/src/fxcrt/fxcrt_posix.cpp')
-rw-r--r--core/src/fxcrt/fxcrt_posix.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index d7df15eb32..f6710eb49b 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -127,53 +127,4 @@ FX_BOOL CFXCRT_FileAccess_Posix::Truncate(FX_FILESIZE szFile) {
}
return !ftruncate(m_nFD, szFile);
}
-FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName) {
- return access(fileName.GetCStr(), F_OK) > -1;
-}
-FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName) {
- return FX_File_Exist(FX_UTF8Encode(fileName));
-}
-FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName) {
- return remove(fileName.GetCStr()) > -1;
-}
-FX_BOOL FX_File_Delete(const CFX_WideStringC& fileName) {
- return FX_File_Delete(FX_UTF8Encode(fileName));
-}
-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)) {
- return FALSE;
- }
- FX_FILESIZE size = src.GetSize();
- if (!size) {
- return FALSE;
- }
- if (!dst.Open(fileNameDst, FX_FILEMODE_Truncate)) {
- return FALSE;
- }
- size_t num = 0;
- uint8_t* pBuffer = FX_Alloc(uint8_t, 32768);
- num = src.Read(pBuffer, 32768);
- while (num) {
- if (dst.Write(pBuffer, num) != num) {
- break;
- }
- num = src.Read(pBuffer, 32768);
- }
- FX_Free(pBuffer);
- return TRUE;
-}
-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(const CFX_ByteStringC& fileNameSrc,
- const CFX_ByteStringC& fileNameDst) {
- return rename(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
-}
-FX_BOOL FX_File_Move(const CFX_WideStringC& fileNameSrc,
- const CFX_WideStringC& fileNameDst) {
- return FX_File_Move(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
-}
#endif