src/files/files.hpp
// Returns our JSON representation of a file or directory.
Returns our JSON representation of a file or directory.
Returns our JSON representation of a file or directory .
inline JSON::Object jsonFileInfo(const std::string& path,
                                 bool isDir,
                                 size_t size)
{
  JSON::Object file;
  file.values["path"] = path;
  file.values["size"] = size;
  if (isDir) {
    file.values["dir"] = JSON::True();
  } else {
    file.values["dir"] = JSON::False();
  }
  return file;
}
inline JSON :: Object jsonFileInfo ( const std :: string & path , bool isDir , size_t size ) { JSON :: Object file ; file . values [ " " ] = path ; file . values [ " " ] = size ; if ( isDir ) { file . values [ " " ] = JSON :: True ( ) ; } else { file . values [ " " ] = JSON :: False ( ) ; } return file ; }
Returns our JSON representation of a file or directory.
Returns our JSON representation of a file or directory .