An interface for writing files from buffers.
More...
#include <file_io.h>
|
virtual bool | Init ()=0 |
| Initialize the writer.
|
|
virtual size_t | Write (const void *data, size_t bytes) const =0 |
| Append buffer to file.
|
|
|
static std::unique_ptr< VirtualFileWriter > | Make (const std::string &filename) |
| Create appropriate writer for filename.
|
|
static bool | Exists (const std::string &filename) |
| Check filename existence.
|
|
An interface for writing files from buffers.
◆ Exists()
bool LightGBM::VirtualFileWriter::Exists |
( |
const std::string & |
filename | ) |
|
|
static |
Check filename existence.
- Parameters
-
filename | Filename of the data |
- Returns
- True when the file exists
◆ Init()
virtual bool LightGBM::VirtualFileWriter::Init |
( |
| ) |
|
|
pure virtual |
Initialize the writer.
- Returns
- True when the file is available for writes
Implemented in LightGBM::LocalFile.
◆ Make()
std::unique_ptr< VirtualFileWriter > LightGBM::VirtualFileWriter::Make |
( |
const std::string & |
filename | ) |
|
|
static |
Create appropriate writer for filename.
- Parameters
-
filename | Filename of the data |
- Returns
- File writer instance
◆ Write()
virtual size_t LightGBM::VirtualFileWriter::Write |
( |
const void * |
data, |
|
|
size_t |
bytes |
|
) |
| const |
|
pure virtual |
Append buffer to file.
- Parameters
-
data | Buffer to write from |
bytes | Number of bytes to write from buffer |
- Returns
- Number of bytes written
Implemented in LightGBM::LocalFile.
The documentation for this struct was generated from the following files:
- External/LightGBM_2.2.3/LightGBM-2.2.3/include/LightGBM/utils/file_io.h
- External/LightGBM_2.2.3/LightGBM-2.2.3/src/io/file_io.cpp