cfile.h
来自「PGP8.0源码 请认真阅读您的文件包然后写出其具体功能」· C头文件 代码 · 共 72 行
H
72 行
/*____________________________________________________________________________
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 + =
减小字号Ctrl + -
显示快捷键?