OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{CachingFileMgr.cpp} Namespace Reference

Functions

size_t size_of_dir (const std::string &dir)
 

Function Documentation

size_t anonymous_namespace{CachingFileMgr.cpp}::size_of_dir ( const std::string &  dir)

Definition at line 28 of file CachingFileMgr.cpp.

References omnisci::file_size().

Referenced by File_Namespace::CachingFileMgr::deleteCacheIfTooLarge().

28  {
29  size_t space_used = 0;
30  if (bf::exists(dir)) {
31  for (const auto& file : bf::recursive_directory_iterator(dir)) {
32  if (bf::is_regular_file(file.path())) {
33  space_used += bf::file_size(file.path());
34  }
35  }
36  }
37  return space_used;
38 }
size_t file_size(const int fd)
Definition: omnisci_fs.cpp:31

+ Here is the call graph for this function:

+ Here is the caller graph for this function: