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

📄 warfiledriverdynamic.h

📁 ftpserver very good sample
💻 H
字号:
/** */#ifndef WAR_FILE_DRIVER_DYNAMIC_H#define WAR_FILE_DRIVER_DYNAMIC_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR_FILE_DRIVER_H#   include "WarFileDriver.h"#endif#ifndef WAR_FILE_DRIVER_DYNAMIC_NODE_DIR_H#	include "WarFileDriverDynamicNodeDir.h"#endif#ifndef WAR_CRITICAL_SECTION_H#	include "WarCriticalSection.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */class WarFileDriverFileDynamic;#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarFileDriverDynamic :     public WarFileDriver{public:    typedef WarPtrWrapper<WarFileDriverDynamic> driver_ptr_t;	typedef WarFileDriverDynamicNodeDir::node_ptr_t node_ptr_t;	typedef WarFileDriverDynamicNodeDir::node_map_t node_map_t;	typedef WarFileDriverDynamicNodeDir::dir_ptr_t dir_ptr_t;        // LIFECYCLE        /** Constructor     *     * @param driverName Name of the driver. The name    * corresponds to the scheme (tag) name of a URL.    * The default driver for local files must be    * called "file". A driver implementimng the    * FTP protocol will be called "ftp". The names    * does not need to be a registered or well-known    * sceme name, but mist consist of only letters    * a-z. The name should be in lowercase.    */    WarFileDriverDynamic(war_ccstr_t driverName);    // OPERATORS    // OPERATIONS	/** Mount a virtual directory in the drivers	  * virtual file system. The directory nodes	  * must be mounted before virtaul file	  * templates can be added.	  * @param newName Name of the node.	  * @param mountInDir Path to the directory	  *		to mount in, or NULL to mount in the 	  *		root node.	  * @exception WarExceptioon if anything goes wrong	*/	virtual void MountDir(war_ccsvrpath_t newName,		war_ccsvrpath_t mountInDir)		throw(WarException);	virtual void MountFile(war_ccsvrpath_t newName,		node_ptr_t pagePtr, 		war_ccsvrpath_t mountInDir)		throw(WarException);	    virtual void WarListDirectory(const WarUrl& Path,        WarDirList& listDestination)        throw(WarException);	virtual void DeleteNode(war_ccsvrpath_t nodeName)		throw(WarException);    /** Checks the paths and creates directorories as requiered.      * This function expects that the Path is to a directory,       * so any file-name on the ned of the original path must       * be stripped off.      */    virtual void WarGenericCreateDirectories(const WarUrl& Path) const        throw(WarException)	{		 WarThrow(WarError(WAR_ERR_NOT_IMPLEMENTED), NULL);	}        ///    virtual war_flen_t WarGetFreeSpaceOnPath(const WarUrl& Path) const        throw(WarException)    {        return 0;    }    ///    virtual war_flen_t WarGetSize(const WarUrl& Path) const        throw(WarException);        ///    virtual void WarStat(const WarUrl& Path, war_stat_t& st) const        throw(WarException);        /// Examines a file. Does not throw.    virtual FileTypeE WarExamine(const WarUrl& Path,          war_stat_t& st) const;    ///    virtual PathCmpTypeE WarGetCmpMode(const WarUrl& Path) const        throw(WarException)    {        return PCMP_CASE_SENSITIVE;    }	node_ptr_t Lookup(war_ccsvrpath_t path) const		throw(WarException);	virtual WarFileDriverFile *WarCreateNewFileObject(const WarUrl& fileUrl) 		const throw(WarException);    // ACCESS    // INQUIRYprotected:	virtual ~WarFileDriverDynamic();	node_ptr_t mRootPtr;	WarCriticalSection mLock;private:};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_FILE_DRIVER_DYNAMIC_H_ */

⌨️ 快捷键说明

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