| Home | Libraries | People | FAQ | More

#### http::basic_file_body

A message body represented by a file on the filesystem.

##### Synopsis

Defined in header `<boost/beast/http/basic_file_body.hpp>`

    template<
        class File>
    struct basic_file_body

##### Types

Name | Description
--- | ---
reader | Algorithm for storing buffers when parsing.
value_type | The type of the message::body member.
writer | Algorithm for retrieving buffers when serializing.
file_type | The type of File this body uses.

##### Member Functions

Name | Description
--- | ---
size | Returns the size of the body.

##### Description

Messages with this type have bodies represented by a file on the file system. When parsing a message using this body type, the data is stored in the file pointed to by the path, which must be writable. When serializing, the implementation will read the file and present those octets as the body content. This may be used to serve content from a directory as part of a web service.

##### Template Parameters

Type | Description
--- | ---
`File` | The implementation to use for accessing files. This type must meet the requirements of File.

Convenience header `<boost/beast/http.hpp>`