------------------------------------------------------------------------------
| 28 | |
| 29 | //------------------------------------------------------------------------------ |
| 30 | bool vtkFileResourceStream::Open(VTK_FILEPATH const char* path) |
| 31 | { |
| 32 | if (this->Impl->File.is_open()) |
| 33 | { |
| 34 | this->Impl->File.close(); |
| 35 | } |
| 36 | |
| 37 | if (path) |
| 38 | { |
| 39 | this->Impl->File.open(path, std::ios_base::binary); |
| 40 | } |
| 41 | |
| 42 | this->Modified(); |
| 43 | return this->Impl->File.is_open(); |
| 44 | } |
| 45 | |
| 46 | //------------------------------------------------------------------------------ |
| 47 | std::size_t vtkFileResourceStream::Read(void* buffer, std::size_t bytes) |