updated file_win and file_pool error handling

This commit is contained in:
Arvid Norberg
2008-02-25 04:41:21 +00:00
parent 480b63b516
commit 9f44c577d7
6 changed files with 134 additions and 93 deletions

View File

@@ -109,7 +109,7 @@ namespace libtorrent
file(fs::path const& p, open_mode m);
~file();
void open(fs::path const& p, open_mode m);
bool open(fs::path const& p, open_mode m);
void close();
bool set_size(size_type size);

View File

@@ -65,7 +65,8 @@ namespace libtorrent
{
file_pool(int size = 40): m_size(size) {}
boost::shared_ptr<file> open_file(void* st, fs::path const& p, file::open_mode m);
boost::shared_ptr<file> open_file(void* st, fs::path const& p
, file::open_mode m, std::string& error);
void release(void* st);
void resize(int size);
@@ -74,9 +75,7 @@ namespace libtorrent
struct lru_file_entry
{
lru_file_entry(boost::shared_ptr<file> const& f)
: file_ptr(f)
, last_use(time_now()) {}
lru_file_entry(): last_use(time_now()) {}
mutable boost::shared_ptr<file> file_ptr;
fs::path file_path;
void* key;