84
95
bool is_valid() const { return m_piece_length > 0; }
86
105
void add_file(file_entry const& e);
106
void add_file(fs::path const& p, size_type size, int flags = 0, std::time_t mtime = 0, fs::path const& s_p = "");
88
107
void rename_file(int index, std::string const& new_filename);
110
void add_file(fs::wpath const& p, size_type size, int flags = 0, std::time_t mtime = 0, fs::path const& s_p = "");
90
115
std::vector<file_slice> map_block(int piece, size_type offset
92
117
peer_request map_file(int file, size_type offset, int size) const;