|
MemoryX use MongoDB implementation of GridFS to store files in a database.
Following properties are supported:
The default cache directory is
~/.armarx/mongo/.cache/files
Amongst other data types, EntityAttribute can have a file as its value. One common usage is an inventor model file required to visualize an object.
MemoryX handles this case as follows: the actual file resides in GridFS, whereas the attribute itself holds only a reference to it (s. memoryx::MongoDBRef class for details).
memoryx::GridFileManager class provides a convenient way to "dereference" such attributes and get the file content. Moreover, it performs local caching of retrieved files "under the hood".
Init short-term memory
Init GridFileManager
Option 1. Get an opened file stream
Option 2. Get a local file name
Both methods will retrieve the whole file and cache it locally, making available for further processing with usual filesystem tools.