diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-01-08 21:59:18 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-01-08 21:59:18 (GMT) |
commit | 030f3b483f54dbef6e164194a1771ef5b346312b (patch) | |
tree | 3f5b949b5ffed83d0b41a95d9fd3cfafd17cab2d /src/uscxml/util/URL.h | |
parent | 1ab8b9a0dcaa131b8cccc735a1794ce39b351715 (diff) | |
download | uscxml-030f3b483f54dbef6e164194a1771ef5b346312b.zip uscxml-030f3b483f54dbef6e164194a1771ef5b346312b.tar.gz uscxml-030f3b483f54dbef6e164194a1771ef5b346312b.tar.bz2 |
Support for caching values on filesystem
Use USCXML_NOCACHE_FILES=YES to prevent, I will make this a build flag
Diffstat (limited to 'src/uscxml/util/URL.h')
-rw-r--r-- | src/uscxml/util/URL.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/uscxml/util/URL.h b/src/uscxml/util/URL.h index c83e3b1..9ad2f8e 100644 --- a/src/uscxml/util/URL.h +++ b/src/uscxml/util/URL.h @@ -136,6 +136,19 @@ public: URL(const std::string url) : _impl(new URLImpl(url)) {} + /** + * Get a persistant, shared directory for resources + * @return A path to an existing directory for resources. + */ + static std::string getResourceDir(); + + /** + * Get a temporary, shared or private directory for resources + * @param shared Whether the temporary directory is shared among instances. + * @return A path to an existing directory for temporary files. + */ + static std::string getTempDir(bool shared = true); + bool isAbsolute() { return _impl->isAbsolute(); } @@ -241,6 +254,8 @@ public: protected: std::shared_ptr<URLImpl> _impl; friend class URLFetcher; + static std::string currTmpDir; + }; class USCXML_API URLFetcher { @@ -270,6 +285,7 @@ protected: std::map<void*, void*> _handlesToHeaders; void* _multiHandle = NULL; char* _envProxy = NULL; + }; } |