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. | |
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.
IlsMvComponent
. 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.
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.