#t and #f added to language, datetime fixes
This commit is contained in:
14
ml_io.cpp
14
ml_io.cpp
@@ -23,12 +23,14 @@ std::string read_file_contents(const std::string &filename) {
|
||||
return contents;
|
||||
}
|
||||
|
||||
int write_file_contents(const std::string &filename, const std::string &content) {
|
||||
std::ofstream f;
|
||||
f.open(filename.c_str());
|
||||
int result = (f << content) ? 1 : 0;
|
||||
f.close();
|
||||
return result;
|
||||
bool write_file_contents(const std::string &filename, const std::string &content) {
|
||||
std::ofstream f(filename.c_str());
|
||||
if (f) {
|
||||
f << content;
|
||||
f.close();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
MlValue list_dir(const std::string &path) {
|
||||
|
||||
Reference in New Issue
Block a user