Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Public Member Functions

This class is used to transmit the name and contents of a file from the server to the component. More...

#include <ilserver/mvvalue.h>

Public Member Functions

 IlsMvFile (const IlsString &fileName=IlsString::Null)
 Constructor. More...
 
IlsString getContents () const
 Returns the contents of the file as read by the constructor of this class. More...
 
IlsString getName () const
 Returns the name of the file as passed to the IlsMvFile constructor.
 

Detailed Description

This class is used to transmit the name and contents of a file from the server to the component.

Library: mvserver
and mvcomp

This class is not reactive. This means that mapping an attribute of type file and then changing the contents of the file will not result in the attribute being renotified. This class is provided so that the server can transmit the contents of a file to a component when a view opens. Thus, the component does not have to have read access to the file.

See also
IlsMvComponent.

Constructor & Destructor Documentation

◆ IlsMvFile()

IlsMvFile::IlsMvFile ( const IlsString fileName = IlsString::Null)

Constructor.

This constructor creates an instance of the class IlsMvFile from the file name passed as the parameter. The content of the file is read in the constructor.

Warning
If the content of the file is changed after the IlsMvFile is created, the new file content is not re-read by existing IlsMvFile objects.

Member Function Documentation

◆ getContents()

IlsString IlsMvFile::getContents ( ) const

Returns the contents of the file as read by the constructor of this class.

Those contents are empty if the file was empty or if the file was not found on the path.