# 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
…
- 64
- 65
- 66
- 67
- 68
…
- 82
- 83

length);
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_NO_LONG_FILE_NAME - The short file name does not have an associated long file name.
• FILEIO_ERROR_DONE - The directory entry could not be cached because the entryOffset contained in record was
invalid.
• FILEIO_ERROR_WRITE - Cached data could not be written to the device.
• FILEIO_ERROR_BAD_SECTOR_READ - The directory entry could not be cached because there was an error reading
from the device.
Description
This function will obtain the long file name of a file found by the FILEIO_Find function and copy it into a user-specified buffer.
The name will be returned in unicode characters.
Preconditions
A drive must have been mounted by the FILEIO library. The FILEIO_SEARCH_RECORD structure must contain valid file
information obtained from the FILEIO_Find function.
Parameters
Parameters Description
record The file record obtained from a successful call of
FILEIO_Find.
buffer A buffer to contain the long file name of the file.
length The length of the buffer, in 16-bit words.
Function
int FILEIO_LongFileNameGet ( FILEIO_SEARCH_RECORD * record, uint16_t * buffer, uint16_t length)
1.7.1.3.32 FILEIO_TimestampGet Type
Describes the user-implemented function to provide the timestamp.
File
fileio_lfn.h
Syntax
typedef void (* FILEIO_TimestampGet)(FILEIO_TIMESTAMP *);
Returns
void
Description
Files in a FAT files system use time values to track create time, access time, and last-modified time. In the FILEIO library,
the user must implement a function that the library can call to obtain the current time. That function will have this format.
Preconditions
N/A.
1.7 Library Interface MLA - File I/O Library Help File I/O Layer
66

- 1
- 2
…
- 64
- 65
- 66
- 67
- 68
…
- 82
- 83