source: cpp/common/util-file.h @ 1124

Last change on this file since 1124 was 1124, checked in by Maciej Komosinski, 8 months ago

Added helper utility functions

File size: 713 bytes
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#ifndef _UTIL_FILES_H_
6#define _UTIL_FILES_H_
7
8#include "nonstd_stl.h"
9#include "virtfile/virtfile.h"
10
11bool readCompleteFile(const char* filename, vector<char>& data, bool warn_on_missing_file = true);
12bool readCompleteFile(const char* filename, string& out, bool warn_on_missing_file = true);
13bool writeCompleteFile(const char* filename, const std::string& text, bool warn_on_fail = true);
14bool writeCompleteFile(const char* filename, vector<char>& data, bool warn_on_fail = true);
15string readUntilEOL(VirtFILE *f);
16
17#endif
Note: See TracBrowser for help on using the repository browser.