class FileApiInterface
Defined at line 29 of file ../../src/bringup/bin/netsvc/file-api.h
Provides capabilities to read/write files sent over TFTP.
Reads only implements netcp. Specifically it enables reading of files in
global /data.
Writes come in 4 flavors:
* netcp: Ability to write to global /data.
* netboot: Mexec into image once write completes.
* paving: Writes boot partions, or FVM.
* board name validation: Validates that board name sent matches current
board.
Public Methods
ssize_t OpenRead (const char * filename, zx::duration timeout)
Returns size of file on success.
tftp_status OpenWrite (const char * filename, size_t size, zx::duration timeout)
tftp_status Read (void * data, size_t * length, off_t offset)
tftp_status Write (const void * data, size_t * length, off_t offset)
void Close ()
void Abort ()
Like close, but signals read or write operation was incomplete.
bool is_write ()
const char * filename ()