Galactic Bloodshed
fileutils.h
Go to the documentation of this file.
1 // Copyright 2014 The Galactic Bloodshed Authors. All rights reserved.
2 // Use of this source code is governed by a license that can be
3 // found in the COPYING file.
4 
5 #ifndef FILEUTILS_H
6 #define FILEUTILS_H
7 
8 #include <cstdio>
9 #include <cstdlib>
10 #include <string>
11 
12 #include <sys/stat.h>
13 #include <unistd.h>
14 
15 /**
16  * Helper utils and classes for making common operations with files eaiser.
17  */
18 void InitFile(const std::string &path, void *buffer = nullptr,
19  size_t length = 0);
20 void EmptyFile(const std::string &path);
21 
22 #endif // MAKEPLANET_H
void InitFile(const std::string &path, void *buffer=nullptr, size_t length=0)
Definition: fileutils.cc:8
void EmptyFile(const std::string &path)
Definition: fileutils.cc:22