A ProtectedFileReader for reading from the Intel SGX Protected File System.
More...
#include <ssgx_filesystem_t.h>
A ProtectedFileReader for reading from the Intel SGX Protected File System.
◆ ProtectedFileReader() [1/2]
◆ ProtectedFileReader() [2/2]
| ssgx::filesystem_t::ProtectedFileReader::ProtectedFileReader |
( |
const char * | file_name | ) |
|
|
explicit |
Opens a file for reading.
- Parameters
-
| file_name | The name of the file to open (must be a valid, non-null C-string). |
- Exceptions
-
◆ ~ProtectedFileReader()
| ssgx::filesystem_t::ProtectedFileReader::~ProtectedFileReader |
( |
| ) |
|
◆ Close()
| void ssgx::filesystem_t::ProtectedFileReader::Close |
( |
| ) |
|
Closes the file.
- Exceptions
-
◆ operator=()
◆ Read()
| size_t ssgx::filesystem_t::ProtectedFileReader::Read |
( |
void * | buffer, |
|
|
size_t | size ) const |
Reads data from the file into the given buffer.
- Parameters
-
| buffer | Pointer to a valid memory location where data will be stored (must not be null). |
| size | Maximum number of bytes to read (must be > 0). For small files, the recommended size is 4KB; For big files, the recommended size is 64KB; Don't set size >= 256KB. |
- Returns
- Number of bytes actually read (0 if EOF is reached).
- Exceptions
-
◆ Seek()
| void ssgx::filesystem_t::ProtectedFileReader::Seek |
( |
int64_t | offset, |
|
|
int | origin ) const |
Moves the file position.
- Parameters
-
| offset | Offset from the origin (can be negative). |
| origin | One of SEEK_SET, SEEK_CUR, SEEK_END. |
- Exceptions
-
◆ Tell()
| int64_t ssgx::filesystem_t::ProtectedFileReader::Tell |
( |
| ) |
const |
Returns the current file position.
- Returns
- Current file position.
- Exceptions
-
The documentation for this class was generated from the following file: