ckfilelist.h

来自「DES加密解密算法,西望大家共享.参考学习」· C头文件 代码 · 共 108 行

H
108
字号
// CkFileList.h: interface for the CkFileList class.
//
//////////////////////////////////////////////////////////////////////

#ifndef _CKFILELIST_H
#define _CKFILELIST_H

#pragma once


class CkByteData;
#include "CkString.h"
#include "CkObject.h"

#pragma warning( disable : 4068 )
#pragma unmanaged

/*
    IMPORTANT: Objects returned by methods as non-const pointers must be deleted
    by the calling application. 

  */


// CLASS: CkFileList
class CkFileList  : public CkObject
{
    public:
	CkFileList();
	virtual ~CkFileList();

	// BEGIN PUBLIC INTERFACE
	bool get_Utf8(void) const;
	void put_Utf8(bool b);

	// Error log retrieval and saving (these methods are common to all Chilkat VC++ classes.)
	bool SaveLastError(const char *filename);
        void LastErrorXml(CkString &str);
        void LastErrorHtml(CkString &str);
        void LastErrorText(CkString &str);

    
	void get_AppendFromDir(CkString &str) const;
	void put_AppendFromDir(const char *dir);

	// Append files exactly as in Chilkat Zip.
	// Return the number of files and directories appended.
	int AppendFilesEx(const char *fileSpec, 
	    bool recurse, bool saveExtraPath, bool archiveOnly, 
	    bool includeHidden, bool includeSystem);

	// Append files exactly as in Chilkat Zip.
	// Return the number of files and directories appended.
	int AppendFiles(const char *fileSpec, bool recurse);

	// Append a single file (relative to AppendFromDir)
	bool AppendFile(const char *filePath);

	// Add an arbitrary directory entry that may not necessarily be on disk.
	bool AppendDirEntry(const char *dirPath);


	int get_Count(void) const;

	bool get_ArchivePath(int idx, CkString &str);
	bool put_ArchivePath(int idx, const char *filePath);

	bool get_DiskPath(int idx, CkString &str);
	bool get_IsOnDisk(int idx);
	bool get_IsDirectory(int idx);

	bool get_Data(int idx, CkByteData &byteData);

	// Replace findStr with replaceStr in all the ArchivePaths.
	void StringReplace(const char *findStr, const char *replaceStr);

	CkString m_resultString;
        const char *lastErrorText(void);
        const char *lastErrorXml(void);
        const char *lastErrorHtml(void);

	const char *archivePath(int index);
	const char *diskPath(int index);
	const char *appendFromDir(int index);

	// END PUBLIC INTERFACE

    // For internal use only.
    private:
	void *m_impl;
	bool m_utf8;	// If true, all input "const char *" parameters are utf-8, otherwise they are ANSI strings.

	// Don't allow assignment or copying these objects.
	CkFileList(const CkFileList &) { } 
	CkFileList &operator=(const CkFileList &) { return *this; }
	CkFileList(void *impl);

    public:
	void *getImpl(void) const { return m_impl; } 


};


#endif


⌨️ 快捷键说明

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