FirteX-高性能全文索引和检索平台

API Documentation


首页 | 名字空间列表 | 类继承关系 | 组合类型列表 | $(BL\录(B | 文件列表 | 名字空间成员 | 组合类型成员 | 文件成员

FSDirectory.h

浏览该文件的文档。
00001 //
00002 // Copyright(C) 2005--2006 Institute of Computing Tech, Chinese Academy of Sciences. 
00003 // All rights reserved.
00004 // This file is part of FirteX (www.firtex.org)
00005 //
00006 // Use of the FirteX is subject to the terms of the software license set forth in 
00007 // the LICENSE file included with this software, and also available at
00008 // http://www.firtex.org/license.html
00009 //
00010 // Author       : 郭瑞杰(GuoRuijie)
00011 // Email        : ruijieguo@software.ict.ac.cn,ruijieguo@gmail.com
00012 // Created      : 2005/11/9
00013 //
00014 #ifndef _FSDIRECTORY_H
00015 #define _FSDIRECTORY_H
00016 #include "Directory.h"
00017 
00018 #include <string>
00019 using namespace std;
00020 
00021 namespace firtex
00022 {
00023         namespace store
00024         {
00025                 class CIndexInput;
00026                 class CIndexOutput;
00027                 class CFSDirectory : public CDirectory
00028                 {
00029                 protected: 
00030                         CFSDirectory(const tstring& path,bool bCreate=false);                   
00031                 public:
00032                         virtual ~CFSDirectory(void);
00033                 public:
00034                         static CFSDirectory*    getDirectory(const tstring& path,bool bCreate);                 
00035                 public:
00039                         FileList*               list();
00040 
00044                         bool                    fileExists(const tstring& name) const;
00045                         
00049                         int64_t                 fileModified(const tstring& name) const;
00050 
00054                         int64_t                 fileLength(const tstring& name) const;
00058                         CIndexInput*    openInput(const tstring& name);
00059 
00063                         CIndexInput*    openInput(const tstring& name,char* buf,size_t bufsize);
00064 
00068                         void                    deleteFile(const tstring& filename,bool throwError = true);
00072                         void                    renameFile(const tstring& from, const tstring& to);
00073 
00079                         void                    batDeleteFiles(const tstring& filename,bool throwError = true);
00080 
00086                         void                    batRenameFiles(const tstring& from, const tstring& to);
00087 
00093                         void                    copyFile(const tstring& filename,CIndexInput* pSrcFile,bool throwError = true);
00094 
00102                         void                    batCopyFiles(CDirectory*pFromDir,const tstring& from,const tstring& to,bool throwError = true);
00103                         
00107                         CIndexOutput*   createOutput(const tstring& name);
00108 
00112                         void                    touchFile(const tstring& name);
00113 
00119                         CDirectory*             clone();
00120 
00124                         void                    close();
00125 
00126                 protected:
00127                         void                    create();
00128                 protected:
00129                         tstring         m_directory;
00130                         int                     m_refCount;//引用计数
00131                 };
00132         }
00133 }
00134 
00135 
00136 #endif

http://www.firtex.org http://www.sourceforge.net/projects/firtex