|
From: Neal R. <ne...@ri...> - 2002-02-12 04:00:07
|
Guys, Here's a well tested piece of code for replacing the calls to 'system(mv)' in htfuzzy/EndingsDB.cc & htfuzzy/Synonym.cc Example Useage: file_copy(root2word.get(), config["endings_root2word_db"].get(), FILECOPY_OVERWRITE_ON); unlink(root2word.get()); returns TRUE or FALSE By well tested I mean shipping and executing tens, if not hundreds, of thousands of times a day in our code. Works across file systems in Linux, Solaris, FreeBSD & Windows NT 4.0, & Windows 2000, and probably many others. Note that each system defines BUFSIZ to be optimal in its libc header files. Thanks. -- Neal Richter Knowledgebase Developer RightNow Technologies, Inc. Customer Service for Every Web Site |