A ProtectedFileWriter for writing to the Intel SGX Protected File System.
More...
#include <ssgx_filesystem_t.h>
A ProtectedFileWriter for writing to the Intel SGX Protected File System.
◆ ProtectedFileWriter() [1/2]
◆ ProtectedFileWriter() [2/2]
| ssgx::filesystem_t::ProtectedFileWriter::ProtectedFileWriter |
( |
const char * | file_name, |
|
|
FileMode | file_mode = FileMode::CreateNew, |
|
|
uint16_t | key_policy = SGX_KEYPOLICY_MRENCLAVE ) |
|
explicit |
Opens a file for writing.
- Parameters
-
| file_name | The name of the file to create or overwrite (must be a valid, non-null C-string). |
| file_mode | One of FileMode to identify the writing operation mode. |
| key_policy | The key policy for sealing operations (default: SGX_KEYPOLICY_MRENCLAVE). |
- Exceptions
-
◆ ~ProtectedFileWriter()
| ssgx::filesystem_t::ProtectedFileWriter::~ProtectedFileWriter |
( |
| ) |
|
◆ Close()
| void ssgx::filesystem_t::ProtectedFileWriter::Close |
( |
| ) |
|
Closes the file.
- Exceptions
-
◆ Flush()
| void ssgx::filesystem_t::ProtectedFileWriter::Flush |
( |
| ) |
const |
Flushes any buffered data to disk.
- Exceptions
-
◆ operator=()
◆ Write()
| void ssgx::filesystem_t::ProtectedFileWriter::Write |
( |
const void * | data, |
|
|
size_t | size ) const |
Writes data to the file.
- Parameters
-
| data | Pointer to the data to be written (must not be null). |
| size | Size of the data in bytes (must be > 0). For small files, the recommended size is 4KB; For big files, the recommended size is 64KB; Don't set size >= 256KB. |
- Exceptions
-
The documentation for this class was generated from the following file: