IlsMvFile
 
IlsMvFile
Category 
Dynamic view-related class (component and server)
Inheritance Path 
IlsMvFile
Description 
This class is used to transmit the name and contents of a file from the server to the component. 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.
Libraries 
<mvserver> and <mvcomp>
Header File 
#include <ilserver/mvvalue.h>
Synopsis 
class IlsMvFile{
public:
IlsMvFile(const IlsString& fileName);
 
IlsString getName() const;
IlsString getContents() const;
};
Constructor
IlsMvFile(const IlsString& fileName);
This constructor creates an instance of the class IlsMvFile from the file name passed as the parameter. The contents of the file are 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 Functions 
IlsString getName() const;
This member function returns the name of the file as passed to the IlsMvFile constructor.
IlsString getContents() const;
This member function 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.
See Also 
IlsMvComponent

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.