Poco::OSP

class BundleStorage

File Information

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: BundleFile, BundleDirectory

Member Summary

Member Functions: getResource, lastModified, list, path

Inherited Functions: duplicate, referenceCount, release

Types Aliases

ConstPtr

using ConstPtr = const Ptr;

Ptr

using Ptr = Poco::AutoPtr < BundleStorage >;

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.

Securely control IoT edge devices from anywhere   Connect a Device