00001
00002
00003
00004
00006
00007
00008
00009
00010
00011
00012
00013
00014
00016
00022 #if !defined(AFX_ZipPlatform_H__E2FE6343_9D03_4F3C_A1F7_706C9F0ED978__INCLUDED_)
00023 #define AFX_ZipPlatform_H__E2FE6343_9D03_4F3C_A1F7_706C9F0ED978__INCLUDED_
00024
00025 #if _MSC_VER > 1000
00026 #pragma once
00027 #endif // _MSC_VER > 1000
00028 class CZipFileHeader;
00029 class CZipAutoBuffer;
00030 #include "ZipString.h"
00031 #include "ZipPathComponent.h"
00032 #include <sys/types.h>
00033 #include "ZipExport.h"
00034
00039 namespace ZipPlatform
00040 {
00041
00045 ZIP_API bool GetSystemCaseSensitivity();
00046
00052 ZIP_API int GetSystemID();
00053
00057 ZIP_API DWORD GetDefaultAttributes();
00058
00062 ZIP_API DWORD GetDefaultDirAttributes();
00063
00067 ZIP_API DWORD GetDeviceFreeSpace(LPCTSTR lpszPath);
00068
00073 ZIP_API CZipString GetTmpFileName(LPCTSTR lpszPath = NULL, DWORD iSizeNeeded = DWORD(-1));
00080 ZIP_API bool GetCurrentDirectory(CZipString& sz);
00081 ZIP_API bool ChangeDirectory(LPCTSTR lpDirectory);
00082 ZIP_API bool SetFileAttr(LPCTSTR lpFileName, DWORD uAttr);
00083 ZIP_API bool GetFileAttr(LPCTSTR lpFileName, DWORD& uAttr);
00084 ZIP_API bool GetFileModTime(LPCTSTR lpFileName, time_t & ttime);
00085 ZIP_API bool GetFileSize(LPCTSTR lpszFileName, DWORD& dSize);
00086 ZIP_API bool SetFileModTime(LPCTSTR lpFileName, time_t ttime);
00087 ZIP_API bool CreateDirectory(LPCTSTR lpDirectory);
00088 ZIP_API bool SetVolLabel(LPCTSTR lpszPath, LPCTSTR lpszLabel);
00089 ZIP_API bool ForceDirectory(LPCTSTR lpDirectory);
00090 ZIP_API bool RemoveFile(LPCTSTR lpszFileName, bool bThrow = true);
00091 ZIP_API bool RenameFile( LPCTSTR lpszOldName, LPCTSTR lpszNewName, bool bThrow = true);
00092
00093 #ifndef _MFC_VER
00094 ZIP_API bool TruncateFile(int iDes, DWORD iSize);
00095 ZIP_API int OpenFile(LPCTSTR lpszFileName, UINT iMode, int iShareMode);
00096 ZIP_API bool FlushFile(int iDes);
00097 ZIP_API int GetFileSystemHandle(int iDes);
00098 #endif
00099
00100
00106 ZIP_API bool DirectoryExists(LPCTSTR lpszDir);
00113 ZIP_API bool IsDriveRemovable(LPCTSTR lpszFilePath);
00119 ZIP_API bool IsDirectory(DWORD uAttr);
00120
00135 ZIP_API void AnsiOem(CZipAutoBuffer& buffer, bool bAnsiToOem);
00145 ZIP_API int FileExists(LPCTSTR lpszName);
00146
00147
00148 #ifdef _UNICODE
00149
00161 ZIP_API int WideToSingle(LPCTSTR lpWide, CZipAutoBuffer &szSingle, bool bUseAnsi);
00174 ZIP_API int SingleToWide(const CZipAutoBuffer &szSingle, CZipString& szWide, bool bUseAnsi);
00175 #endif
00176 };
00177
00178
00179 #endif // !defined(AFX_ZipPlatform_H__E2FE6343_9D03_4F3C_A1F7_706C9F0ED978__INCLUDED_)