Library: OSP
Package: Bundle
Header: Poco/OSP/BundleStorage.h
BundleStorage manages provides access to all resources stored inside of a bundle.
BundleStorage itself is an abstract class; subclasses implement the BundleStorage interface for bundles stored in directories or Zip files.
Paths to resources within a bundle are always specified using Unix notation - directories are separated with a forward slash ('/').
Direct Base Classes: Poco::RefCountedObject
All Base Classes: Poco::RefCountedObject
Known Derived Classes: BundleDirectory, BundleFile
Member Functions: getResource, list, path
Inherited Functions: duplicate, referenceCount, release
typedef Poco::AutoPtr < BundleStorage > Ptr;
virtual ~BundleStorage();
Destroys the BundleStorage.
virtual std::istream * getResource(
const std::string & path
) const = 0;
Returns an input stream for reading the resource with the given path, if the resource exists. Otherwise, returns NULL.
The caller receives ownership of, and is responsible for deleting the input stream when it's no longer needed.
virtual void list(
const std::string & path,
std::vector < std::string > & files
) const = 0;
List all files in the directory specified by path. If path is empty, all files in the bundle root directory are listed.
virtual std::string path() const = 0;
Returns the path to the bundle's directory or archive file.