bes
Updated for version 3.20.5
|
33 #include "BESFileContainer.h"
34 #include "TheBESKeys.h"
37 #include "BESUncompressManager3.h"
38 #include "BESUncompressCache.h"
40 #include "BESForbiddenError.h"
50 BESFileContainer::BESFileContainer(
const string &sym_name,
const string &real_name,
const string &type) :
51 BESContainer(sym_name, real_name, type), _cached(false), _target(
"")
53 string::size_type dotdot = real_name.find(
"..");
54 if (dotdot != string::npos) {
55 string s = (string)
"'../' not allowed in container real name " + real_name;
65 BESContainer(copy_from), _cached(copy_from._cached), _target(copy_from._target)
92 BESDEBUG(
"cache2",
"Entering " << __PRETTY_FUNCTION__ <<
", real_name: " <<
get_real_name() << endl);
105 BESDEBUG(
"cache2",
"Cached as: " << _target << endl);
109 BESDEBUG(
"cache2",
"Not cached" << endl);
124 BESDEBUG(
"cache2",
"Entering " << __PRETTY_FUNCTION__ <<
", _cached: " << _cached <<
", _target: " << _target << endl);
140 strm << BESIndent::LMarg <<
"BESFileContainer::dump - (" << (
void *)
this <<
")" << endl;
143 BESIndent::UnIndent();
Holds real data, container type and constraint for symbolic name read from persistence.
virtual bool uncompress(const string &src, string &target, BESFileLockingCache *cache)
If the file 'src' should be uncompressed, do so and return a new file name on the value-result param ...
static BESUncompressCache * get_instance()
virtual BESContainer * ptr_duplicate()
duplicate this instances of BESFileContainer
virtual void dump(ostream &strm) const
dumps information about this object
virtual void unlock_and_close(const std::string &target)
virtual void dump(ostream &strm) const
Displays debug information about this object.
error thrown if the BES is not allowed to access the resource requested
A container is something that holds data. E.G., a netcdf file or a database entry.
virtual bool release()
release the file
virtual string access()
returns the name of a file to access for this container, uncompressing if necessary.
void _duplicate(BESContainer ©_to)
duplicate this instance into the passed container
string get_real_name() const
retrieve the real name for this container, such as a file name.