12 #include "Poco/Path.h"
13 #include "Poco/File.h"
15 #include "files/file_properties.h"
30 enum class NAF::Files::FileType
41 File(std::string name, std::string filename, std::string content_type, std::size_t content_length);
43 FileType get_file_type()
const{
return file_type_;}
44 std::size_t get_content_length()
const{
return content_length_;}
45 std::string get_content_type()
const{
return content_type_;}
46 std::string get_name()
const {
return name_;}
47 std::string get_filename()
const {
return filename_;}
51 auto& var = file_properties_;
54 std::shared_ptr<Path>& get_requested_path()
56 auto& var = requested_path_;
59 std::shared_ptr<Poco::File>& get_requested_file()
61 auto& var = requested_file_;
64 std::shared_ptr<Poco::File>& get_tmp_file()
66 auto& var = tmp_file_;
71 void set_file_type(FileType file_type) {file_type_ = file_type;}
72 void set_filename(std::size_t content_length) {content_length_ = content_length;}
73 void set_content_length(std::size_t content_length) {content_length_ = content_length;}
74 void set_content_type(std::string content_type) {content_type_ = content_type;}
75 void set_name(std::string name) {name_ = name;}
76 void set_filename(std::string filename) {filename_ = filename;}
79 std::size_t content_length_;
80 std::string content_type_;
82 std::string filename_;
85 std::shared_ptr<Path> requested_path_;
86 std::shared_ptr<Poco::File> requested_file_;
87 std::shared_ptr<Poco::File> tmp_file_;
Definition: file_properties.h:36