file.h File Reference

file operation functions More...

Functions

void * spdk_posix_file_load (FILE *file, size_t *size)
 Load the input file content into a data buffer. More...
 
void * spdk_posix_file_load_from_name (const char *file_name, size_t *size)
 Load content of a given file name into a data buffer. More...
 

Detailed Description

file operation functions

Function Documentation

◆ spdk_posix_file_load()

void* spdk_posix_file_load ( FILE *  file,
size_t *  size 
)

Load the input file content into a data buffer.

Parameters
fileFile handle.
sizeSize of bytes read from the file.
Returns
data contains the content on success, NULL on failure.

◆ spdk_posix_file_load_from_name()

void* spdk_posix_file_load_from_name ( const char *  file_name,
size_t *  size 
)

Load content of a given file name into a data buffer.

Parameters
file_nameFile name.
sizeSize of bytes read from the file.
Returns
data containing the content on success, NULL on failure.