Llama.cpp C++-to-Csharp wrapper from testedlines.com: C++ docs 1.0.1
Llama.cpp C++-to-Csharp wrapper is a minor extension to Llama.cpp tag b3490 codebase modified a bit by testedlines allowing it to be compiled for and called from Styled Lines Csharp unity asset store package.
Loading...
Searching...
No Matches
FileWrapper Class Reference

Provides static utility functions for saving data to files. More...

#include <lib.h>

+ Collaboration diagram for FileWrapper:

Static Public Member Functions

static bool Save (const char *data, std::size_t data_length, const std::string &path)
 Saves data to a file.
 
static bool Save (const std::string &data, const std::string &path)
 Saves string data to a file.
 
static bool Save (unsigned char *data, long data_length, const std::string &path)
 Saves binary data to a file.
 

Detailed Description

Provides static utility functions for saving data to files.

The FileWrapper class offers methods to save data in various formats (string, binary data) to a file specified by a path. It provides an easy interface to handle different data types and ensures proper file operations are performed.

Member Function Documentation

◆ Save() [1/3]

static bool FileWrapper::Save ( const char * data,
std::size_t data_length,
const std::string & path )
static

Saves data to a file.

This method is a helper function that writes raw data to a file at the specified path. It is used internally by other Save methods to handle the actual file operations.

Parameters
dataA pointer to the raw data to be written to the file.
data_lengthThe length of the data.
pathThe path where the file will be saved.
Returns
True if the file was successfully saved, false otherwise.

◆ Save() [2/3]

static bool FileWrapper::Save ( const std::string & data,
const std::string & path )
static

Saves string data to a file.

This method writes the contents of a string to a file at the specified path.

Parameters
dataThe string data to be written to the file.
pathThe path where the file will be saved.
Returns
True if the file was successfully saved, false otherwise.

◆ Save() [3/3]

static bool FileWrapper::Save ( unsigned char * data,
long data_length,
const std::string & path )
static

Saves binary data to a file.

This method writes the contents of a binary data buffer to a file at the specified path.

Parameters
dataA pointer to the binary data to be written to the file.
data_lengthThe length of the binary data.
pathThe path where the file will be saved.
Returns
True if the file was successfully saved, false otherwise.

The documentation for this class was generated from the following file: