MADARA
3.4.1
|
Splits files into fragments that can be saved to and loaded from a knowledge base. More...
#include <FileFragmenter.h>
Public Member Functions | |
FileFragmenter () | |
Constructor. More... | |
FileFragmenter (char *buffer, size_t size, size_t frag_size=60000) | |
Constructor. More... | |
FileFragmenter (const std::string &filename, size_t frag_size=60000) | |
Constructor. More... | |
containers::Vector | create_vector (const std::string &key, KnowledgeBase &kb, const KnowledgeUpdateSettings &settings=KnowledgeUpdateSettings::GLOBAL_AS_LOCAL_NO_EXPAND) |
Creates a vector in a knowledge base with the current file fragments. More... | |
size_t | fragment_buffer (char *buffer, size_t size, size_t frag_size=60000) |
Fragments a file into smaller buffers up to a specified size. More... | |
size_t | fragment_file (const std::string &filename, size_t frag_size=60000) |
Fragments a file into smaller buffers up to a specified size. More... | |
size_t | from_kb (const std::string &key, KnowledgeBase &kb, const KnowledgeUpdateSettings &settings=KnowledgeUpdateSettings::GLOBAL_AS_LOCAL_NO_EXPAND) |
Creates a vector in a knowledge base with the current file fragments. More... | |
const char * | get_file_contents (void) |
Returns the file contents as a character buffer. More... | |
Public Attributes | |
utility::ScopedArray< char > | file_contents |
the buffer that holds the file contents More... | |
size_t | file_size |
the size of the file contents More... | |
KnowledgeVector | records |
records that contain the file fragments More... | |
Splits files into fragments that can be saved to and loaded from a knowledge base.
Definition at line 22 of file FileFragmenter.h.
|
inline |
Constructor.
Definition at line 28 of file FileFragmenter.h.
|
inline |
Constructor.
buffer | the file contents |
size | the size of the buffer in bytes |
frag_size | the max size of fragments to create |
Definition at line 36 of file FileFragmenter.h.
|
inline |
Constructor.
filename | the file to read in and fragment |
frag_size | the max size of fragments to create |
Definition at line 47 of file FileFragmenter.h.
|
inline |
Creates a vector in a knowledge base with the current file fragments.
key | the location in the knowledge base to save to |
kb | the knowledge base to save to |
settings | the knowledge update settings to use for Vector |
Definition at line 131 of file FileFragmenter.h.
|
inline |
Fragments a file into smaller buffers up to a specified size.
buffer | the file contents |
size | the size of the buffer in bytes |
frag_size | the max size of fragments to create |
Definition at line 93 of file FileFragmenter.h.
|
inline |
Fragments a file into smaller buffers up to a specified size.
filename | the file to read in and fragment |
frag_size | the max size of fragments to create |
Definition at line 60 of file FileFragmenter.h.
|
inline |
Creates a vector in a knowledge base with the current file fragments.
This method is useful to check file transfer progress through a KB.
key | the location in the knowledge base to load from |
kb | the knowledge base to load from |
settings | the knowledge update settings to use |
Definition at line 151 of file FileFragmenter.h.
|
inline |
Returns the file contents as a character buffer.
Definition at line 232 of file FileFragmenter.h.
utility::ScopedArray<char> madara::knowledge::FileFragmenter::file_contents |
the buffer that holds the file contents
Definition at line 244 of file FileFragmenter.h.
size_t madara::knowledge::FileFragmenter::file_size |
the size of the file contents
Definition at line 241 of file FileFragmenter.h.
KnowledgeVector madara::knowledge::FileFragmenter::records |
records that contain the file fragments
Definition at line 238 of file FileFragmenter.h.