ZipPlatform.h

Go to the documentation of this file.
00001 
00002 // $RCSfile: ZipPlatform.h,v $
00003 // $Revision: 1.4 $
00004 // $Date: 2006/01/28 20:18:12 $ $Author: Tadeusz Dracz $
00006 // This source file is part of the ZipArchive library source distribution and
00007 // is Copyrighted 2000 - 2006 by Tadeusz Dracz (http://www.artpol-software.com/)
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 // 
00014 // For the licensing details see the file License.txt
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_)

ZipArchive Copyright © 2000 - 2006 Tadeusz Dracz . Generated at Fri Apr 7 13:55:23 2006.