Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
file.h
Go to the documentation of this file.
1#pragma once
2#include <misc/gen/TStrings.h>
3#include <misc/global.h>
4
5namespace sf
6{
7
11_MISC_FUNC std::string getLine(std::istream& is);
12
16_MISC_FUNC bool fileExists(const char* path);
17
21inline bool fileExists(const std::string& path)
22{
23 return fileExists(path.c_str());
24}
25
29_MISC_FUNC std::string fileBaseName(const std::string& path);
30
34_MISC_FUNC std::string fileDirName(const std::string& path);
35
39_MISC_FUNC bool fileUnlink(const std::string& path);
40
44_MISC_FUNC bool fileRename(const std::string& old_path, const std::string& new_path);
45
49_MISC_FUNC bool findFiles(strings& files, const std::string& wildcard);
50
54_MISC_FUNC std::string::value_type getDirectorySeparator();
55
60
65
70
75
80
85
86}// namespace sf
Counted vector of strings.
Definition TStrings.h:12
#define _MISC_FUNC
Definition misc/global.h:39
Definition Application.h:10
_MISC_FUNC std::string getExecutableDirectory()
Returns the executable directory.
_MISC_FUNC bool findFiles(strings &files, const std::string &wildcard)
Finds the files using the passed wildcard.
_MISC_FUNC std::string getDynamicLibraryExtension()
Returns OS dependent dynamic library extension.
_MISC_FUNC std::string fileBaseName(const std::string &path)
Same as basename() but using a std::string.
_MISC_FUNC std::string getTemporaryDirectory()
Returns the temporary directory.
_MISC_FUNC std::string fileDirName(const std::string &path)
Same as dirname() but using a std::string.
_MISC_FUNC bool fileRename(const std::string &old_path, const std::string &new_path)
Same as rename() but using a std::string.
_MISC_FUNC bool fileExists(const char *path)
Checks if the passed path exist (by doing an access() using F_OK).
_MISC_FUNC std::string getWorkingDirectory()
Returns the working directory.
_MISC_FUNC std::string getExecutableName()
Returns the executable name.
_MISC_FUNC std::string getExecutableFilepath()
Returns the executable filepath.
_MISC_FUNC std::string::value_type getDirectorySeparator()
Returns OS dependent directory separation character.
_MISC_FUNC bool fileUnlink(const std::string &path)
Same as unlink() but using a std::string.
_MISC_FUNC std::string getLine(std::istream &is)
Return a line from the input stream.