19#include "hitls_build.h"
20#ifdef HITLS_BSL_SAL_FILE
44} BSL_SAL_FileCallback;
46int32_t SAL_FileCallBack_Ctrl(BSL_SAL_CB_FUNC_TYPE type,
void *funcCb);
48#if defined(HITLS_BSL_SAL_LINUX) || defined(HITLS_BSL_SAL_DARWIN)
49int32_t SAL_FILE_FOpen(bsl_sal_file_handle *stream,
const char *path,
const char *mode);
50int32_t SAL_FILE_FRead(bsl_sal_file_handle stream,
void *buffer,
size_t size,
size_t num,
size_t *len);
51int32_t SAL_FILE_FWrite(bsl_sal_file_handle stream,
const void *buffer,
size_t size,
size_t num);
52void SAL_FILE_FClose(bsl_sal_file_handle stream);
53int32_t SAL_FILE_FLength(
const char *path,
size_t *len);
54bool SAL_FILE_FError(bsl_sal_file_handle stream);
55int32_t SAL_FILE_FTell(bsl_sal_file_handle stream,
long *pos);
56int32_t SAL_FILE_FSeek(bsl_sal_file_handle stream,
long offset, int32_t origin);
57char *SAL_FILE_FGets(bsl_sal_file_handle stream,
char *buf, int32_t readLen);
58bool SAL_FILE_FPuts(bsl_sal_file_handle stream,
const char *buf);
59bool SAL_FILE_Flush(bsl_sal_file_handle stream);
60int32_t SAL_FILE_Feof(bsl_sal_file_handle stream);
61int32_t SAL_FILE_FSetAttr(bsl_sal_file_handle stream,
int cmd,
const void *arg);
62int32_t SAL_FILE_FGetAttr(bsl_sal_file_handle stream,
void *arg);
int32_t(* BslSalFileSeek)(bsl_sal_file_handle stream, long offset, int32_t origin)
Change the current file position associated with stream to a new location within the file.
定义 bsl_sal.h:1693
bool(* BslSalFlush)(bsl_sal_file_handle stream)
Flush cache buffer associated with the specified output stream.
定义 bsl_sal.h:1736
void(* BslSalFileClose)(bsl_sal_file_handle stream)
Close the file.
定义 bsl_sal.h:1630
int32_t(* BslSalFSetAttr)(bsl_sal_file_handle stream, int cmd, const void *arg)
Set the attributes associated with the terminal referred to by the open stream.
定义 bsl_sal.h:1766
int32_t(* BslSalFileLength)(const char *path, size_t *len)
Obtain the file length.
定义 bsl_sal.h:1646
int32_t(* BslSalFileTell)(bsl_sal_file_handle stream, long *pos)
Get the current file position in stream.
定义 bsl_sal.h:1676
int32_t(* BslSalFeof)(bsl_sal_file_handle stream)
Indicate whether the end-of-file flag is set for the given stream.
定义 bsl_sal.h:1749
int32_t(* BslSalFileRead)(bsl_sal_file_handle stream, void *buffer, size_t size, size_t num, size_t *len)
Read the file.
定义 bsl_sal.h:1599
int32_t(* BslSalFileOpen)(bsl_sal_file_handle *stream, const char *path, const char *mode)
Open the file.
定义 bsl_sal.h:1580
bool(* BslSalFileError)(bsl_sal_file_handle stream)
Test the error indicator for the given stream.
定义 bsl_sal.h:1660
int32_t(* BslSalFGetAttr)(bsl_sal_file_handle stream, void *arg)
Get the attributes associated with the terminal referred to by the open stream.
定义 bsl_sal.h:1782
int32_t(* BslSalFileWrite)(bsl_sal_file_handle stream, const void *buffer, size_t size, size_t num)
Write the file
定义 bsl_sal.h:1617
char *(* BslSalFGets)(bsl_sal_file_handle stream, char *buf, int32_t readLen)
Read a line from the stream and store it into the buffer.
定义 bsl_sal.h:1709
bool(* BslSalFPuts)(bsl_sal_file_handle stream, const char *buf)
Write a string to the specified stream.
定义 bsl_sal.h:1723