# 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
…
- 33
- 34
- 35
- 36
- 37
…
- 82
- 83

Parameters
Parameters Description
pathName The path/name of the file.
Function
int FILEIO_Remove (const char * pathName)
1.7.1.2.5 FILEIO_Rename Function
Renames a file.
File
fileio_lfn.h
Syntax
int FILEIO_Rename(const uint16_t * oldPathName, const uint16_t * newFileName);
Module
Long 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.
• FILEIO_ERROR_INVALID_FILENAME - One of the file names is invalid.
• FILEIO_ERROR_FILENAME_EXISTS - The new file name already exists on this device.
• FILEIO_ERROR_FILE_NOT_FOUND - The file could not be found.
• FILEIO_ERROR_WRITE - The updated file data and entry could not be written to the device.
• FILEIO_ERROR_DONE - The directory entry could not be found or the library could not find a sufficient number of
empty entries in the dir to store the new file name.
• FILEIO_ERROR_BAD_SECTOR_READ - The directory entry could not be cached.
• FILEIO_ERROR_ERASE_FAIL - The file's entries could not be erased (applies when renaming a long file name)
• FILEIO_ERROR_DIR_FULL - New file entries could not be created.
• FILEIO_ERROR_BAD_CACHE_READ - The lfn entries could not be cached.
Description
Renames a file specifed by oldPathname to the name specified by newFilename.
Preconditions
The file's drive must be mounted and the file/path specified by oldPathname must exist.
Parameters
Parameters Description
oldPathName The path/name of the file to rename.
newFileName The new name of the file.
1.7 Library Interface MLA - File I/O Library Help File I/O Layer
35

- 1
- 2
…
- 33
- 34
- 35
- 36
- 37
…
- 82
- 83