Poco::OSP

class BundleStorage

Library: OSP
Package: Bundle
Header: Poco/OSP/BundleStorage.h

Description

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 ('/').

Inheritance

Direct Base Classes: Poco::RefCountedObject

All Base Classes: Poco::RefCountedObject

Known Derived Classes: BundleDirectory, BundleFile

Member Summary

Member Functions: getResource, lastModified, list, path

Inherited Functions: duplicate, referenceCount, release

Types

ConstPtr

typedef const Ptr ConstPtr;

Ptr

typedef Poco::AutoPtr < BundleStorage > Ptr;

Destructor

~BundleStorage protected virtual

virtual ~BundleStorage();

Destroys the BundleStorage.

Member Functions

getResource virtual

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.

lastModified virtual

virtual Poco::Timestamp lastModified(
    const std::string & path
) const = 0;

Returns the last modification timestamp for the specified file.

list virtual

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.

path virtual

virtual std::string path() const = 0;

Returns the path to the bundle's directory or archive file.