19 !std::is_copy_constructible_v<CFileInputStream> &&
20 !std::is_copy_assignable_v<CFileInputStream>,
31 "Error trying to open file: '%s'", fileName.c_str());
47 m_if.open(fileName.c_str(), ios_base::binary | ios_base::in);
48 return m_if.is_open();
69 if (!
m_if.is_open())
return 0;
71 m_if.read(static_cast<char*>(Buffer), Count);
72 return m_if.fail() ? 0 : Count;
80 [[maybe_unused]]
const void* Buffer, [[maybe_unused]]
size_t Count)
92 if (!
m_if.is_open())
return 0;
94 ifstream::off_type offset = Offset;
95 ifstream::seekdir way;
112 m_if.seekg(offset, way);
124 auto& f =
const_cast<std::ifstream&
>(
m_if);
126 const uint64_t previousPos = f.tellg();
128 uint64_t fileSize = f.tellg();
129 f.seekg(previousPos, ios_base::beg);
138 auto& f =
const_cast<std::ifstream&
>(
m_if);
155 if (!
m_if.is_open())
return false;
157 std::getline(
m_if, str);
166 if (!
m_if.is_open())
return true;
TSeekOrigin
Used in CStream::Seek.
#define THROW_EXCEPTION(msg)
const_iterator end() const
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)