coan  6.0.1
A C/C++ Configuration Analyzer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
filesys.h File Reference
#include <string>

Go to the source code of this file.

Namespaces

 fs
 Namespace fs encloses filesystem operations.
 

Typedefs

using fs::obj_type_t = unsigned
 Abstract type of filesystem object types.
 
using fs::permissions = int
 Type of file permissions mask.
 

Enumerations

enum  { fs::OBJ_NONE, fs::OBJ_SLINK = 1, fs::OBJ_FILE = 2, fs::OBJ_DIR = 4 }
 Symbolic constants denoting filesystem objects. More...
 

Functions

bool fs::is_file (obj_type_t type)
 Say whether an object type is a file. More...
 
bool fs::is_dir (obj_type_t type)
 Say whether an object type is a directory. More...
 
bool fs::is_slink (obj_type_t type)
 Say whether an object type is a symbolic link. More...
 
obj_type_t fs::obj_type (std::string const &name)
 Get the type of the object putatively designated by a filename.
 
std::string fs::real_path (std::string const &relname)
 Get the absolute real pathname of a file or directory name. More...
 
std::string fs::abs_path (std::string const &filename)
 Get the absolute pathname for a filename. More...
 
bool fs::is_absolute (std::string pathname)
 Say whether a filename is absolute or relative.
 
std::string fs::cwd ()
 Get the absolute real pathname of the current working directory.
 
std::string fs::tempname (std::string const &format)
 Create a tempory filename from a template. More...
 
void fs::make_dir (std::string const &abs_path, bool recursive=true)
 Create a directory given an absolute path name. More...
 
permissions fs::get_permissions (std::string const &filename)
 
int fs::set_permissions (std::string const &filename, permissions p)
 

Detailed Description

This file defines an API of file-syetem operations

Definition in file filesys.h.