added extension for file attributes. Fixes problem when sharing Application bundles on OSX or hidden files on windows

This commit is contained in:
Arvid Norberg
2009-01-11 22:27:43 +00:00
parent de9286a760
commit 43e69cd316
11 changed files with 186 additions and 44 deletions

View File

@@ -117,9 +117,16 @@ file structure. Its synopsis::
bool is_valid() const;
enum flags_t
{
pad_file = 1,
attribute_hidden = 2,
attribute_executable = 4
};
void add_file(file_entry const& e);
void add_file(fs::path const& p, size_type size, bool pad_file = false);
void add_file(fs::wpath const& p, size_type size, bool pad_file = false);
void add_file(fs::path const& p, size_type size, int flags = 0);
void add_file(fs::wpath const& p, size_type size, int flags = 0);
void rename_file(int index, std::string const& new_filename);
void rename_file(int index, std::wstring const& new_filename);
@@ -152,6 +159,23 @@ file structure. Its synopsis::
void swap(file_storage& ti);
}
add_file()
----------
::
void add_file(file_entry const& e);
void add_file(fs::path const& p, size_type size, int flags = 0);
void add_file(fs::wpath const& p, size_type size, int flags = 0);
Adds a file to the file storage. The ``flags`` argument sets attributes on the file.
The file attributes is an extension and may not work in all bittorrent clients.
The possible arreibutes are::
pad_file
attribute_hidden
attribute_executable
create_torrent
==============