[Xapian-devel] add some class to wrap all operation of file

cyt at coremail.cn cyt at coremail.cn
Wed May 22 07:56:39 BST 2013


Sorry for my poor English first.
I am a beginner of xapian. I found that each database backend has own code to handle the file operations such as open/read/write/mkdir/rename...
I want to add some class to wrap all of these.
That will bring some benefits:
* the code which depends on the OS/compiler will be collected in one place.
* developer can write his own File System implement. such as no file lock while he can ensure no concurrency conflict( needn't fork now ), or cacheable file I/O.
* developer can use other "File System" such as his own distributed file system.

I just change the chert backend in xapian-core-1.2.15, add two file into the project: include/xapian/filesystem.h and common/filesystem.cc, and changed the other code in chert/common/net/api.
I only run the simple test in example path( simpleindex and simplesearch ) after patched.
That seems like work fine.

Is it useful for the xapian?

I've add the patch files here:
https://github.com/cytal/Xapian-patched/compare/master...FileSystem


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20130522/936b3594/attachment.htm>


More information about the Xapian-devel mailing list