forked from premiere/premiere-libtorrent
added documentation to explain that remap_files can be used to rename the base name of a torrent
This commit is contained in:
parent
8724b89499
commit
241b72aabe
|
@ -1728,7 +1728,7 @@ which the trackers are to be tried. For more information see <a class="reference
|
||||||
<h2>files() orig_files()</h2>
|
<h2>files() orig_files()</h2>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
file_storage const& file() const;
|
file_storage const& files() const;
|
||||||
file_storage const& orig_files() const;
|
file_storage const& orig_files() const;
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
@ -1766,6 +1766,9 @@ void rename_file(int index, std::wstring const& new_filename);
|
||||||
<p>Renames a the file with the specified index to the new name. The new filename is
|
<p>Renames a the file with the specified index to the new name. The new filename is
|
||||||
reflected by the <tt class="docutils literal"><span class="pre">file_storage</span></tt> returned by <tt class="docutils literal"><span class="pre">files()</span></tt> but not by the one
|
reflected by the <tt class="docutils literal"><span class="pre">file_storage</span></tt> returned by <tt class="docutils literal"><span class="pre">files()</span></tt> but not by the one
|
||||||
returned by <tt class="docutils literal"><span class="pre">orig_files()</span></tt>.</p>
|
returned by <tt class="docutils literal"><span class="pre">orig_files()</span></tt>.</p>
|
||||||
|
<p>If you want to rename the base name of the torrent (for a multifile torrent), you
|
||||||
|
can copy the <tt class="docutils literal"><span class="pre">file_storage</span></tt> (see <a class="reference internal" href="#files-orig-files">files() orig_files()</a>), change the name, and
|
||||||
|
then use <a class="reference internal" href="#remap-files">remap_files()</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="begin-files-end-files-rbegin-files-rend-files">
|
<div class="section" id="begin-files-end-files-rbegin-files-rend-files">
|
||||||
<h2>begin_files() end_files() rbegin_files() rend_files()</h2>
|
<h2>begin_files() end_files() rbegin_files() rend_files()</h2>
|
||||||
|
|
|
@ -1582,7 +1582,7 @@ files() orig_files()
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
file_storage const& file() const;
|
file_storage const& files() const;
|
||||||
file_storage const& orig_files() const;
|
file_storage const& orig_files() const;
|
||||||
|
|
||||||
The ``file_storage`` object contains the information on how to map the pieces to
|
The ``file_storage`` object contains the information on how to map the pieces to
|
||||||
|
@ -1623,6 +1623,10 @@ Renames a the file with the specified index to the new name. The new filename is
|
||||||
reflected by the ``file_storage`` returned by ``files()`` but not by the one
|
reflected by the ``file_storage`` returned by ``files()`` but not by the one
|
||||||
returned by ``orig_files()``.
|
returned by ``orig_files()``.
|
||||||
|
|
||||||
|
If you want to rename the base name of the torrent (for a multifile torrent), you
|
||||||
|
can copy the ``file_storage`` (see `files() orig_files()`_), change the name, and
|
||||||
|
then use `remap_files()`_.
|
||||||
|
|
||||||
|
|
||||||
begin_files() end_files() rbegin_files() rend_files()
|
begin_files() end_files() rbegin_files() rend_files()
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue