2.5 Virtual File System

The Virtual File System (VFS) enables your target to access parts of a host filesystem, through a target OS-specific driver and a memory-mapped device called the MessageBox. Access to the host filesystem is analogous to access to a shared network drive.

The VFS supports these filesystem operations:
getattr
Retrieve metadata for the file, directory or symbolic link.
mkdir
Create a new directory.
remove
Remove a file, directory or symbolic link.
rename
Rename a file, directory or symbolic link.
rmdir
Remove an empty directory.
setattr
Set metadata for the file, directory or symbolic link.

Note

The VFS does not implement setattr.
The VFS does not support symbolic links. The model cannot create hard links but those that the host operating system creates do function correctly.
The VFS supports these mount points:
closemounts
Free the iterator handle returned from openmounts.
openmounts
Retrieve an iterator handle for the list of available mounts.
readmounts
Read one entry from the mount iterator ID.
The VFS supports the following directory iterators:
closedir
Free a directory iterator handle retrieved by opendir.
opendir
Retrieve an iterator handle for the directory specified.
readdir
Read the next entry from the directory iterator.

Note

Datestamps returned are in milliseconds elapsed since the VFS epoch of January 01 1970 00:00 UTC and are host datestamps. The host datestamp might be in the future relative to the simulated OS datestamp.
The VFS supports these file operations:
closefile
Free a handle opened with openfile.
filesync
Force the host OS to flush all file data to persistent storage.
getfilesize
Return the size of a file, in bytes.
openfile
Return a handle to the file specified.
readfile
Read a block of data from a file.
setfilesize
Set the size of a file in bytes, either by truncating, or extending the file with zeroes.
writefile
Write a block of data to a file.
Non-ConfidentialPDF file icon PDF versionARM DUI0837H
Copyright © 2014-2016 ARM. All rights reserved.