# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- File I/O Library

- 1
- 2
…
- 21
- 22
- 23
- 24
- 25
…
- 82
- 83

File
fileio.h
Syntax
int FILEIO_DriveUnmount(const char driveId);
Module
Short File Name Library API
Returns
• If Success: FILEIO_RESULT_SUCCESS
• If Failure: FILEIO_RESULT_FAILURE
Description
Unmounts a drive from the file system and writes any pending data to the drive.
Preconditions
FILEIO_DriveMount must have been called.
Parameters
Parameters Description
driveId The character representation of the mounted drive.
Function
int FILEIO_DriveUnmount (const char driveID)
1.7.1.1.3 FILEIO_Open Function
Opens a file for access.
File
fileio.h
Syntax
int FILEIO_Open(FILEIO_OBJECT * filePtr, const char * pathName, uint16_t mode);
Module
Short File Name Library API
Returns
• If Success: FILEIO_RESULT_SUCCESS
• If Failure: FILEIO_RESULT_FAILURE
• Sets error code which can be retrieved with FILEIO_ErrorGet Note that if the path cannot be resolved, the error will be
returned for the current working directory.
• FILEIO_ERROR_INVALID_ARGUMENT - The path could not be resolved.
• FILEIO_ERROR_WRITE_PROTECTED - The device is write protected or this function was called in a write/create
mode when writes are disabled in configuration.
• FILEIO_ERROR_INVALID_FILENAME - The file name is invalid.
• FILEIO_ERROR_ERASE_FAIL - There was an error when trying to truncate the file.
• FILEIO_ERROR_WRITE - Cached file data could not be written to the device.
• FILEIO_ERROR_DONE - The directory entry could not be found.
1.7 Library Interface MLA - File I/O Library Help File I/O Layer
23

- 1
- 2
…
- 21
- 22
- 23
- 24
- 25
…
- 82
- 83