From c8cb12158776a34a443558210470dd432b01e7e1 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 25 Aug 2007 19:57:32 +0000 Subject: [PATCH] updated torrent_info::remap_files docs --- docs/manual.html | 7 ++++--- docs/manual.rst | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/manual.html b/docs/manual.html index 8421f973c..b5b928c77 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -1072,16 +1072,17 @@ least one tracker url or at least one DHT node.

remap_files()

-bool remap_files(std::vector<std::string, libtorrent::size_type> const& map);
+bool remap_files(std::vector<std::pair<std::string, libtorrent::size_type> > const& map);
 

This call will create a new mapping of the data in this torrent to other files. The torrent_info maintains 2 views of the file storage. One that is true to the torrent file, and one that represents what is actually saved on disk. This call will change what the files on disk are called.

+

The each entry in the vector map is a pair of a (relative) file path and the file's size.

The return value indicates if the remap was successful or not. True means success and -false means failure. The only reason for failure is if the sum of all the files passed -in through map has to be exactly the same as the total_size of the torrent.

+false means failure. The sum of all the files passed in through map has to be exactly +the same as the total_size of the torrent.

begin_files() end_files() rbegin_files() rend_files()

diff --git a/docs/manual.rst b/docs/manual.rst index 400cde918..98ba002ce 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -987,16 +987,18 @@ remap_files() :: - bool remap_files(std::vector const& map); + bool remap_files(std::vector > const& map); This call will create a new mapping of the data in this torrent to other files. The ``torrent_info`` maintains 2 views of the file storage. One that is true to the torrent file, and one that represents what is actually saved on disk. This call will change what the files on disk are called. +The each entry in the vector ``map`` is a pair of a (relative) file path and the file's size. + The return value indicates if the remap was successful or not. True means success and -false means failure. The only reason for failure is if the sum of all the files passed -in through ``map`` has to be exactly the same as the total_size of the torrent. +false means failure. The sum of all the files passed in through ``map`` has to be exactly +the same as the total_size of the torrent. begin_files() end_files() rbegin_files() rend_files()