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

Last change on this file since 1305 was 1153, checked in by Maciej Komosinski, 3 years ago

Added debugging messages and a non-VirtFILE implementation of readUntilEOL()

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