Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef FILESYSTEM_H_
- #define FILESYSTEM_H_
- #include <Filesystem/Stream.h>
- #include <string>
- class Filesystem {
- public:
- virtual Stream* open(std::string resource) = 0;
- ... read/write/delete/copy/etc...
- };
- #endif
- #ifndef LOCAL_FILESYSTEM_H_
- #define LOCAL_FILESYSTEM_H_
- #include <Filesystem/Stream.h>
- #include <string>
- // Use native fopen/fread/fwrite
- class LocalFilesystem : public Filesystem {
- public:
- virtual Stream* open(std::string resource);
- ... read/write/delete/copy/etc...
- };
- #endif
- #ifndef CLOUD_FILESYSTEM_H_
- #define CLOUD_FILESYSTEM_H_
- #include <Filesystem/Stream.h>
- #include <string>
- // Use socket to stream to your service
- class CloudFilesystem : public Filesystem {
- public:
- virtual Stream* open(std::string resource);
- ... read/write/delete/copy/etc...
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement