separated file_storage from torrent_info and create_torrent

This commit is contained in:
Arvid Norberg
2008-05-28 08:44:40 +00:00
parent cf37d8544d
commit 3910fe78de
31 changed files with 1859 additions and 1514 deletions

View File

@@ -115,6 +115,16 @@ namespace libtorrent
return e.file_ptr;
}
void file_pool::release(fs::path const& p)
{
boost::mutex::scoped_lock l(m_mutex);
typedef nth_index<file_set, 0>::type path_view;
path_view& pt = get<0>(m_files);
path_view::iterator i = pt.find(p);
if (i != pt.end()) pt.erase(i);
}
void file_pool::release(void* st)
{
boost::mutex::scoped_lock l(m_mutex);