Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file defines some IO interfaces for compatibility with Google IO specifications.
Definition at line 29 of file file.h.
|
| File (absl::string_view name) |
virtual | ~File ()=default |
virtual size_t | Read (void *buf, size_t size)=0 |
| Reads "size" bytes to buf from file, buff should be pre-allocated.
|
virtual size_t | Write (const void *buf, size_t size)=0 |
| Writes "size" bytes of buf to file, buff should be pre-allocated.
|
virtual absl::Status | Close (int flags)=0 |
| Closes the file and delete the underlying FILE* descriptor.
|
virtual bool | Flush ()=0 |
| Flushes buffer.
|
virtual size_t | Size ()=0 |
| Returns file size.
|
virtual bool | Open () const =0 |
| Returns whether the file is currently open.
|
int64_t | ReadToString (std::string *line, uint64_t max_length) |
size_t | WriteString (absl::string_view str) |
| Writes a string to file.
|
absl::string_view | filename () const |
| Returns the file name.
|