Beispiel #1
0
	void torrent_handle::rename_file(int index, fs::wpath const& new_name) const
	{
		INVARIANT_CHECK;
		std::string utf8;
		wchar_utf8(new_name.string(), utf8);
		TORRENT_FORWARD(rename_file(index, utf8));
	}
void torrent_handle::move_storage(
    std::wstring const& save_path, int flags) const
{
    std::string utf8;
    wchar_utf8(save_path, utf8);
    async_call(&torrent::move_storage, utf8, flags);
}
Beispiel #3
0
	inline void add_files(file_storage& fs, std::wstring const& wfile, boost::uint32_t flags = 0)
	{
		std::string utf8;
		wchar_utf8(wfile, utf8);
		detail::add_files_impl(fs, parent_path(complete(utf8))
			, filename(utf8), detail::default_pred, flags);
	}
Beispiel #4
0
	std::string wchar_utf8(wstring_view wide)
	{
		error_code ec;
		std::string ret = wchar_utf8(wide, ec);
		if (ec) aux::throw_ex<system_error>(ec);
		return ret;
	}
Beispiel #5
0
	void file_storage::add_file(std::wstring const& file, size_type size, int flags
		, std::time_t mtime, std::string const& symlink_path)
	{
		std::string utf8;
		wchar_utf8(file, utf8);
		add_file(utf8, size, flags, mtime, symlink_path);
	}
Beispiel #6
0
	void torrent_handle::move_storage(
		fs::wpath const& save_path) const
	{
		INVARIANT_CHECK;
		std::string utf8;
		wchar_utf8(save_path.string(), utf8);
		TORRENT_FORWARD(move_storage(utf8));
	}
	TORRENT_DEPRECATED_PREFIX
	void TORRENT_DEPRECATED add_files(file_storage& fs, std::wstring const& wfile, Pred p, boost::uint32_t flags = 0)
	{
		std::string utf8;
		wchar_utf8(wfile, utf8);
		detail::add_files_impl(fs, parent_path(complete(utf8))
			, filename(utf8), p, flags);
	}
Beispiel #8
0
	void file_storage::rename_file(int index, std::wstring const& new_filename)
	{
		TORRENT_ASSERT(index >= 0 && index < int(m_files.size()));
		std::string utf8;
		wchar_utf8(new_filename, utf8);
		m_files[index].set_name(utf8.c_str());
		update_path_index(m_files[index]);
	}
void torrent_handle::rename_file(int index, std::wstring const& new_name) const
{
    std::string utf8;
    wchar_utf8(new_name, utf8);
    async_call(&torrent::rename_file, index, utf8);
}
Beispiel #10
0
	void file_storage::set_name(std::wstring const& n)
	{
		std::string utf8;
		wchar_utf8(n, utf8);
		m_name = utf8;
	}
Beispiel #11
0
	void torrent_handle::rename_file(file_index_t index, std::wstring const& new_name) const
	{
		async_call(&torrent::rename_file, index, wchar_utf8(new_name));
	}
Beispiel #12
0
	void torrent_handle::move_storage(
		std::wstring const& save_path, int flags) const
	{
		async_call(&torrent::move_storage, wchar_utf8(save_path), flags);
	}