00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00014
00020 #if !defined(ZIPARCHIVE_ZIPPLATFORM_DOT_H)
00021 #define ZIPARCHIVE_ZIPPLATFORM_DOT_H
00022
00023 #if _MSC_VER > 1000
00024 #pragma once
00025 #endif
00026
00027 class CZipFileHeader;
00028 class CZipAutoBuffer;
00029
00030 #include "ZipString.h"
00031 #include "ZipPathComponent.h"
00032 #include <sys/types.h>
00033 #include "ZipExport.h"
00034
00038 namespace ZipPlatform
00039 {
00040
00047 ZIP_API bool GetSystemCaseSensitivity();
00048
00058 ZIP_API int GetSystemID();
00059
00066 ZIP_API DWORD GetDefaultAttributes();
00067
00074 ZIP_API DWORD GetDefaultDirAttributes();
00075
00085 ZIP_API ULONGLONG GetDeviceFreeSpace(LPCTSTR lpszPath);
00086
00097 ZIP_API CZipString GetTmpFileName(LPCTSTR lpszPath = NULL, ZIP_SIZE_TYPE uSizeNeeded = 0);
00098
00104 ZIP_API bool GetCurrentDirectory(CZipString& sz);
00105 ZIP_API bool ChangeDirectory(LPCTSTR lpDirectory);
00106 ZIP_API bool SetFileAttr(LPCTSTR lpFileName, DWORD uAttr);
00107 ZIP_API bool GetFileAttr(LPCTSTR lpFileName, DWORD& uAttr);
00108 ZIP_API bool GetFileModTime(LPCTSTR lpFileName, time_t & ttime);
00109 ZIP_API bool SetFileModTime(LPCTSTR lpFileName, time_t ttime);
00110 ZIP_API bool GetFileSize(LPCTSTR lpszFileName, ZIP_SIZE_TYPE& dSize);
00111 ZIP_API bool CreateNewDirectory(LPCTSTR lpDirectory);
00112 ZIP_API bool SetVolLabel(LPCTSTR lpszPath, LPCTSTR lpszLabel);
00113 ZIP_API bool ForceDirectory(LPCTSTR lpDirectory);
00114 ZIP_API bool RemoveFile(LPCTSTR lpszFileName, bool bThrow = true);
00115 ZIP_API bool RenameFile( LPCTSTR lpszOldName, LPCTSTR lpszNewName, bool bThrow = true);
00116
00117 #ifdef _ZIP_SYSTEM_LINUX
00118 ZIP_API bool SetExeAttr( LPCTSTR lpFileName );
00119 #endif
00120
00121 #if defined _ZIP_IMPL_STL || _ZIP_FILE_IMPLEMENTATION == ZIP_ZFI_STL
00122
00128 ZIP_API bool TruncateFile(int iDes, ULONGLONG uSize);
00129
00136 ZIP_API int OpenFile(LPCTSTR lpszFileName, UINT iMode, int iShareMode);
00137
00144 ZIP_API bool FlushFile(int iDes);
00145
00152 ZIP_API intptr_t GetFileSystemHandle(int iDes);
00153 #endif
00154
00155
00156
00169 ZIP_API bool IsDriveRemovable(LPCTSTR lpszFilePath);
00170
00180 ZIP_API bool IsDirectory(DWORD uAttr);
00181
00191 ZIP_API void AnsiOem(CZipAutoBuffer& buffer, bool bAnsiToOem);
00192
00205 ZIP_API int FileExists(LPCTSTR lpszName);
00206
00207 #ifdef _UNICODE
00208
00227 ZIP_API int WideToMultiByte(LPCWSTR lpszIn, CZipAutoBuffer &szOut, UINT uCodePage);
00228
00249 ZIP_API int MultiByteToWide(const CZipAutoBuffer &szIn, CZipString& szOut, UINT uCodePage);
00250 #endif
00251 };
00252
00253
00254 #endif // !defined(ZIPARCHIVE_ZIPPLATFORM_DOT_H)
00255