CoreUtils/JSONFile.h
2023-10-10 15:49:46 -07:00

34 lines
507 B
C++

#ifndef __JSONFile_h__
#define __JSONFile_h__
#include "JString.h"
#include "File.h"
#include <iostream>
#include <sstream>
namespace coreutils {
///
/// Use the JSONFile object where you need a file based persistent backing store
/// for the JString style object.
///
class JSONFile : public JString : public File {
public:
JSONFile(ZString path): JString(), File(path, O_RDWR, 0644) {
}
virtual ~JSONFile() {
write(*this);
}
};
}
#endif