diff options
Diffstat (limited to 'FoundationEx/src/data.cpp')
-rw-r--r-- | FoundationEx/src/data.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/FoundationEx/src/data.cpp b/FoundationEx/src/data.cpp new file mode 100644 index 0000000..643e823 --- /dev/null +++ b/FoundationEx/src/data.cpp @@ -0,0 +1,42 @@ +/* Starshatter: The Open Source Project + Copyright (c) 2021-2024, Starshatter: The Open Source Project Contributors + Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors + Copyright (c) 1997-2006, Destroyer Studios LLC. +*/ + +#include <starshatter/foundation/data.h> + +#include <fstream> +#include <memory> + +#include <starshatter/foundation/reader.h> + +#include "reader/file.h" + + + +namespace starshatter +{ +namespace foundation +{ +namespace data +{ + + +bool +toggle_filesystem(bool) +{ + return true; +} + + +Reader +open(const char* pathname) +{ + return {std::make_unique<FileReader>(std::fstream(pathname, std::ios::binary | std::ios::in))}; +} + + +} // namespace data +} // namespace foundation +} // namespace starshatter |