Virtual filesystem

The Virtual FileSystem (VFS) enables your target to access parts of a host filesystem. This access is achieved through a target OS-specific driver and a memory-mapped device called the MessageBox. When using the VFS, access to the host filesystem is analogous to access to a shared network drive, and can be expected to behave in the same way.

If you want to build your own system that includes the VFS, see the reference information at the end of this topic. See also the WritingADriver.txt file in %PVLIB_HOME%\VFS2\docs\.

Note

VFS support is only provided by VE RTSM models. MPS RTSM models do not support VFS functionality.

The VFS supports the following filesystem operations:

getattr

retrieves metadata for the file, directory or symbolic link

mkdir

creates a new directory

remove

removes a file, directory or symbolic link

rename

renames a file, directory or symbolic link

rmdir

removes an empty directory

setattr

sets metadata for the file, directory or symbolic link.

Note

setattr is not currently implemented.

Symbolic links are not currently supported. Hard links cannot be created by the model but hard links created by the host operating system function correctly.

The VFS supports the following mount points:

closemounts

frees the iterator handle returned from openmounts

openmounts

retrieves an iterator handle for the list of available mounts

readmounts

reads one entry from the mount iterator ID.

The VFS supports the following directory iterators:

closedir

frees a directory iterator handle retrieved by opendir

opendir

retrieves an iterator handle for the directory specified

readdir

reads 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 the following file operations:

closefile

frees a handle opened with openfile

filesync

forces the host OS to flush all file data to persistent storage

getfilesize

returns the current size of a file, in bytes

openfile

returns a handle to the file specified

readfile

reads a block of data from a file

setfilesize

sets the current size of a file in bytes, either by truncating, or extending the file with zeroes

writefile

writes a block of data to a file.

Show/hideSee also

Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0575D
Non-ConfidentialID051712