Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
filesys.cpp File Reference
#include "filesys.h"
#include "util/string.h"
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cerrno>
#include <fstream>
#include <atomic>
#include "log.h"
#include "config.h"
#include "porting.h"
#include "irr_ptr.h"
#include <IFileArchive.h>
#include <IFileSystem.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
+ Include dependency graph for filesys.cpp:

Namespaces

namespace  fs
 

Macros

#define LAST_OS_ERROR()   strerror(errno)
 

Functions

std::vector< DirListNodefs::GetDirListing (const std::string &pathstring)
 
bool fs::CreateDir (const std::string &path)
 
bool fs::PathExists (const std::string &path)
 
bool fs::IsPathAbsolute (const std::string &path)
 
bool fs::IsDir (const std::string &path)
 
bool fs::IsExecutable (const std::string &path)
 
bool fs::IsDirDelimiter (char c)
 
bool fs::RecursiveDelete (const std::string &path)
 
bool fs::DeleteSingleFileOrEmptyDirectory (const std::string &path)
 
std::string fs::TempPath ()
 Returns path to temp directory.
 
std::string fs::CreateTempFile ()
 Returns path to securely-created temporary file (will already exist when this function returns).
 
std::string fs::CreateTempDir ()
 Returns path to securely-created temporary directory (will already exist when this function returns).
 
bool fs::CopyFileContents (const std::string &source, const std::string &target)
 
void fs::GetRecursiveDirs (std::vector< std::string > &dirs, const std::string &dir)
 
std::vector< std::string > fs::GetRecursiveDirs (const std::string &dir)
 
void fs::GetRecursiveSubPaths (const std::string &path, std::vector< std::string > &dst, bool list_files, const std::set< char > &ignore)
 
bool fs::RecursiveDeleteContent (const std::string &path)
 
bool fs::CreateAllDirs (const std::string &path)
 
bool fs::CopyDir (const std::string &source, const std::string &target)
 
bool fs::MoveDir (const std::string &source, const std::string &target)
 
bool fs::PathStartsWith (const std::string &path, const std::string &prefix)
 
std::string fs::RemoveLastPathComponent (const std::string &path, std::string *removed, int count)
 
std::string fs::RemoveRelativePathComponents (std::string path)
 
std::string fs::AbsolutePath (const std::string &path)
 
const char * fs::GetFilenameFromPath (const char *path)
 
bool fs::safeWriteToFile (const std::string &path, std::string_view content)
 
bool fs::extractZipFile (io::IFileSystem *fs, const char *filename, const std::string &destination)
 
bool fs::ReadFile (const std::string &path, std::string &out, bool log_error)
 
bool fs::Rename (const std::string &from, const std::string &to)
 
bool fs::OpenStream (std::filebuf &stream, const char *filename, std::ios::openmode mode, bool log_error, bool log_warn)
 Open a file buffer with error handling, commonly used with std::fstream.rdbuf().
 

Macro Definition Documentation

◆ LAST_OS_ERROR

#define LAST_OS_ERROR ( )    strerror(errno)