added wpath and wstring overloads for functions dealing with paths for more complete wide character support. #432
This commit is contained in:
@@ -59,8 +59,11 @@ add_files
|
||||
|
||||
template <class Pred>
|
||||
void add_files(file_storage& fs, boost::filesystem::path const& path, Pred p);
|
||||
template <class Pred>
|
||||
void add_files(file_storage& fs, boost::filesystem::wpath const& path, Pred p);
|
||||
|
||||
void add_files(file_storage& fs, boost::filesystem::path const& path);
|
||||
void add_files(file_storage& fs, boost::filesystem::wpath const& path);
|
||||
|
||||
Adds the file specified by ``path`` to the ``file_storage`` object. In case ``path``
|
||||
refers to a diretory, files will be added recursively from the directory.
|
||||
@@ -71,6 +74,10 @@ which ``p`` returns true are traversed. ``p`` must have the following signature:
|
||||
|
||||
bool Pred(boost::filesystem::path const& p);
|
||||
|
||||
and for the wpath version::
|
||||
|
||||
bool Pred(boost::filesystem::wpath const& p);
|
||||
|
||||
The path that is passed in to the predicate is the full path of the file or
|
||||
directory. If no predicate is specified, all files are added, and all directories
|
||||
are traveresed.
|
||||
@@ -84,8 +91,11 @@ set_piece_hashes()
|
||||
|
||||
template <class Fun>
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p, Fun f);
|
||||
template <class Fun>
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p, Fun f);
|
||||
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p);
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p);
|
||||
|
||||
This function will assume that the files added to the torrent file exists at path
|
||||
``p``, read those files and hash the content and set the hashes in the ``create_torrent``
|
||||
@@ -109,7 +119,9 @@ file structure. Its synopsis::
|
||||
|
||||
void add_file(file_entry const& e);
|
||||
void add_file(fs::path const& p, size_type size);
|
||||
void add_file(fs::wpath const& p, size_type size);
|
||||
void rename_file(int index, std::string const& new_filename);
|
||||
void rename_file(int index, std::wstring const& new_filename);
|
||||
|
||||
std::vector<file_slice> map_block(int piece, size_type offset
|
||||
, int size) const;
|
||||
@@ -134,6 +146,7 @@ file structure. Its synopsis::
|
||||
int piece_size(int index) const;
|
||||
|
||||
void set_name(std::string const& n);
|
||||
void set_name(std::wstring const& n);
|
||||
const std::string& name() const;
|
||||
|
||||
void swap(file_storage& ti);
|
||||
|
@@ -1710,7 +1710,9 @@ Its declaration looks like this::
|
||||
|
||||
boost::filesystem::path save_path() const;
|
||||
void move_storage(boost::filesystem::path const& save_path) const;
|
||||
void move_storage(boost::filesystem::wpath const& save_path) const;
|
||||
void rename_file(int index, boost::filesystem::path) const;
|
||||
void rename_file(int index, boost::filesystem::wpath) const;
|
||||
storage_interface* get_storage_impl() const;
|
||||
|
||||
sha1_hash info_hash() const;
|
||||
@@ -1831,6 +1833,7 @@ move_storage()
|
||||
::
|
||||
|
||||
void move_storage(boost::filesystem::path const& save_path) const;
|
||||
void move_storage(boost::filesystem::wpath const& save_path) const;
|
||||
|
||||
Moves the file(s) that this torrent are currently seeding from or downloading to. If
|
||||
the given ``save_path`` is not located on the same drive as the original save path,
|
||||
@@ -1848,6 +1851,7 @@ rename_file()
|
||||
::
|
||||
|
||||
void rename_file(int index, boost::filesystem::path) const;
|
||||
void rename_file(int index, boost::filesystem::wpath) const;
|
||||
|
||||
Renames the file with the given index asynchronously. The rename operation is complete
|
||||
when either a ``file_renamed_alert`` or ``file_rename_failed_alert`` is posted.
|
||||
|
Reference in New Issue
Block a user