Safeheron-SGX-Native-Development-Framework v1.2.0
Loading...
Searching...
No Matches
ssgx::filesystem_t::PlainFileReader Class Reference

Read a plaintext file (file size <= 100 KB) More...

#include <ssgx_filesystem_t.h>

Public Member Functions

 PlainFileReader (std::string filepath)
 Construct a PlainFileReader and initialized it.
 
std::vector< uint8_t > ReadAllBytes () const
 Read a plaintext binary file, the max file size is 100KB.
 
std::string ReadAllText () const
 Read a plaintext text file, the max file size is 100KB.
 

Detailed Description

Read a plaintext file (file size <= 100 KB)

Constructor & Destructor Documentation

◆ PlainFileReader()

ssgx::filesystem_t::PlainFileReader::PlainFileReader ( std::string filepath)
inlineexplicit

Construct a PlainFileReader and initialized it.

Parameters
[in]filepathFile path

Member Function Documentation

◆ ReadAllBytes()

std::vector< uint8_t > ssgx::filesystem_t::PlainFileReader::ReadAllBytes ( ) const

Read a plaintext binary file, the max file size is 100KB.

Returns
Return the file content, in bytes.
Exceptions
FileSystemExceptionIf the file is not open or a read error occurs.

◆ ReadAllText()

std::string ssgx::filesystem_t::PlainFileReader::ReadAllText ( ) const

Read a plaintext text file, the max file size is 100KB.

Returns
Return the file content, in string.
Exceptions
FileSystemExceptionIf the file is not open or a read error occurs.

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