mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-12 16:15:43 -04:00
re-wrote cleanupDirectory() function. As this a cause of the slow startup.
Startup time is massively improved! Please test on Windows! git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6757 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
715984249c
commit
ae2df43b8a
3 changed files with 133 additions and 10 deletions
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <stdint.h>
|
||||
|
||||
class RsThread;
|
||||
|
@ -85,7 +86,9 @@ bool fileExists(const std::string& file);
|
|||
bool checkFile(const std::string& filename,bool disallow_empty_file = false);
|
||||
bool checkDirectory(const std::string& dir);
|
||||
bool checkCreateDirectory(const std::string& dir);
|
||||
bool cleanupDirectory(const std::string& dir, const std::list<std::string> &keepFiles);
|
||||
|
||||
bool cleanupDirectory(const std::string& dir, const std::set<std::string> &keepFiles);
|
||||
bool cleanupDirectoryFaster(const std::string& dir, const std::set<std::string> &keepFiles);
|
||||
|
||||
bool hashFile(const std::string& filepath, std::string &name, std::string &hash, uint64_t &size);
|
||||
bool getFileHash(const std::string& filepath,std::string &hash, uint64_t &size, RsThread *thread = NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue