Public Member Functions | Protected Member Functions | List of all members
Atom::Files::FileManager Class Reference
Inheritance diagram for Atom::Files::FileManager:
Inheritance graph
[legend]
Collaboration diagram for Atom::Files::FileManager:
Collaboration graph
[legend]

Public Member Functions

 FileManager (OperationType operation_type)
 
std::map< std::string, Files::FileProperties > & get_supported_files ()
 
OperationType get_operation_type () const
 
std::string get_directory_base () const
 
std::string get_directory_for_uploaded_files () const
 
std::string get_directory_for_temp_files () const
 
JSON::Object::Ptr & get_result ()
 
std::vector< Files::File > & get_files ()
 
void set_operation_type (OperationType operation_type)
 
void set_directory_base (std::string directory_base)
 
void set_directory_for_uploaded_files (std::string directory_for_uploaded_files)
 
void set_directory_for_temp_files (std::string directory_for_temp_files)
 
void handlePart (const MessageHeader &header, std::istream &stream) override
 
std::string GenerateName_ (std::string name)
 
bool CheckFile_ (Files::File &current_file)
 
bool CheckFiles_ ()
 
bool IsSupported_ ()
 
bool IsSupported_ (Files::File &file)
 
void DownloadFile_ (std::ostream &out_response)
 
void UploadFile_ ()
 
void RemoveFile_ ()
 
void AddSupportedFile_ (std::string extension, Files::FileProperties file_properties)
 
void AddBasicSupportedFiles_ ()
 
Files::File CreateTempFile_ (std::string uri)
 
Files::File CreateTempFileFromAddress_ (std::string address)
 
void ProcessContentLength_ ()
 
bool VerifyMaxFileSize_ ()
 

Protected Member Functions

void ProcessFiles_ (Files::File &file, Files::FileProperties properties)
 
void ProcessFileType_ ()
 
std::string SplitHeaderValue_ (const MessageHeader &header, std::string header_name, std::string parameter)
 
void CheckTargetFilename_ (Files::File &file, std::string directory)
 
std::size_t ReplaceText_ (std::string &inout, std::string what, std::string with)