⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfile.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: CFile.h,v 1.6 2002/11/21 18:42:55 wjb Exp $
____________________________________________________________________________*/

#ifndef Included_CFile_h	// [
#define Included_CFile_h

#include "pgpClassesConfig.h"
#include "CPFLImpFactory.h"

_PGP_BEGIN

// Class CFile

class CFile SMART_ERROR_INHERIT
{
	NOT_COPYABLE(CFile)
	DECLARE_IMPHOST(CFile)

public:
	enum
	{
		kNoFlags			= 0x0000, 
		kReadOnlyFlag		= 0x0001, 
		kDenyReadFlag		= 0x0002, 
		kShareWriteFlag		= 0x0004, 
		kCreateIfFlag		= 0x0008, 
		kNoBufferingFlag	= 0x0010	// may have restrictions
	};

public:
	PGPBoolean	IsOpened() const;
	PGPBoolean	IsReadOnly() const;
	PGPBoolean	IsVirtualVolume() const;

	const char * Path() const;

#if PGP_EXCEPTIONS
	PGPUInt64	GetLength() const;
	PGPUInt64	GetUniqueFileId() const;
#else	// !PGP_EXCEPTIONS
	CComboError	GetLength(PGPUInt64& length) const;
	CComboError	GetUniqueFileId(PGPUInt64& fileId) const;
#endif	// PGP_EXCEPTIONS

	SMART_ERROR	SetIsCompressed(PGPBoolean isCompressed);
	SMART_ERROR	SetLength(PGPUInt64 length);

	static PGPBoolean	IsFileInUseByReader(const char *path);
	static PGPBoolean	IsFileInUseByWriter(const char *path);
	static PGPBoolean	IsFileInUse(const char *path);

	void	Flush();

	SMART_ERROR	Open(const char *path, PGPUInt32 flags = kNoFlags);
	SMART_ERROR	Close();
	SMART_ERROR	Delete(const char *path);
	SMART_ERROR	Move(const char *oldPath, const char *newPath);

	SMART_ERROR	Read(void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes) const;
	SMART_ERROR	Write(const void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes) ;//const;
};

_PGP_END

#endif	// ] Included_CFile_h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -