add file_name() to file_storage
This commit is contained in:
@@ -426,6 +426,13 @@ namespace libtorrent
|
||||
return combine_path(m_paths[fe.path_index], fe.filename());
|
||||
}
|
||||
|
||||
std::string file_storage::file_name(int index) const
|
||||
{
|
||||
TORRENT_ASSERT(index >= 0 && index < int(m_files.size()));
|
||||
internal_file_entry const& fe = m_files[index];
|
||||
return fe.filename();
|
||||
}
|
||||
|
||||
size_type file_storage::file_size(int index) const
|
||||
{
|
||||
TORRENT_ASSERT(index >= 0 && index < int(m_files.size()));
|
||||
@@ -481,6 +488,11 @@ namespace libtorrent
|
||||
return combine_path(m_paths[fe.path_index], fe.filename());
|
||||
}
|
||||
|
||||
std::string file_storage::file_name(internal_file_entry const& fe) const
|
||||
{
|
||||
return fe.filename();
|
||||
}
|
||||
|
||||
size_type file_storage::file_size(internal_file_entry const& fe) const
|
||||
{
|
||||
return fe.size;
|
||||
|
Reference in New Issue
Block a user