Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
path.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <boost/filesystem.hpp>
4 #include <boost/filesystem/path.hpp> // for path
5 #include <stddef.h> // for size_t
6 #include <string> // for string
7 #include <vector> // for vector
8 
9 namespace inexor { namespace filesystem {
10 
14 
16 extern const std::string filecontents(const std::string &filename);
17 
23 extern const std::string filecontents_partly(const std::string &filename, size_t start_line, size_t end_line);
24 
29 extern std::vector<Path> &list_files(Path folder, std::vector<Path> &file_list, Path ext);
30 } } // ns inexor::filesystem
31 
const std::string filecontents(const std::string &filename)
Retrieve the contents of a text file.
Definition: path.cpp:16
std::vector< Path > & list_files(Path folder, std::vector< Path > &file_list, Path ext)
Retrieve a list of all files inside a folder (non recursively!).
Definition: path.cpp:43
char * path(char *s)
Modifies the input string to only contain slashes in the direction the platform allows.
Definition: stream.cpp:63
const std::string filecontents_partly(const std::string &filename, size_t start_line, size_t end_line)
Load the contents of a file in a specific section.
Definition: path.cpp:28
static cubeext & ext(cube &c)
Definition: octa.hpp:60
char string[MAXSTRLEN]
cube-strings (char arrays of fixed size).
Definition: cube_types.hpp:18
boost::filesystem::path Path
Definition: path.hpp:13