File: read.h

package info (click to toggle)
r-cran-sourcetools 0.1.7-1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 308 kB
  • sloc: cpp: 1,985; ansic: 505; sh: 10; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef SOURCETOOLS_READ_READ_H
#define SOURCETOOLS_READ_READ_H

#include <vector>
#include <string>

#include <sourcetools/read/MemoryMappedReader.h>

namespace sourcetools {

inline bool read(const std::string& absolutePath, std::string* pContent)
{
  return detail::MemoryMappedReader::read(absolutePath.c_str(), pContent);
}

inline bool read_lines(const std::string& absolutePath,
                       std::vector<std::string>* pLines)
{
  return detail::MemoryMappedReader::read_lines(absolutePath.c_str(), pLines);
}

}  // namespace sourcetools

#endif /* SOURCETOOLS_READ_READ_H */