Define an equal operator (i.e. '==') for maxscript visible
values.
Define a NOT equal operator (i.e. '!=') for maxscript visible
values.
Open an encrypted text file for read.
- Parameters:
-
[in] |
ifile_name |
The file name. |
[in] |
seed |
The seed encryption value. |
[in] |
encoding |
The encoding to use if if can not be determined from the file
contents, If -1, a default encoding based on the file language
settings in Preference /Files (exposed through
Interface14) will be used. |
- Returns:
- The FileStream instance itself if max is able to open the file
or undefined if it fails.
Open a text file
- Parameters:
-
[in] |
ifile_name |
The file name. |
[in] |
imode |
The file open mode. See the MAXScript Help file, topic
FileStream Values, for a description of the mode string
values. |
[in] |
encoding |
The encoding to use if if can not be determined from the file
contents, If -1, a default encoding based on the file language
settings in Preference /Files (exposed through
Interface14) will be used. |
- Returns:
- The FileStream instance itself if max is able to open the file
or undefined if it fails.
: public CharBinaryStream
{
public:
MSTR mode;
CharStream* log;
Parser* reader;
ScripterExport FileStream();
ScripterExport ~FileStream();
classof_methods (FileStream, CharStream);
# define is_filestream(v) ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(FileStream))
void collect();
void gc_trace();
ScripterExport void sprin1(CharStream* s);
#include "../macros/define_implementations.h"
# include "../protocols/streams.inl"
virtual void seek(int pos);
ScripterExport FileStream* open_decrypt(const MCHAR* ifile_name, int seed, unsigned int encoding = -1);
ScripterExport FileStream* open(const MCHAR* ifile_name, const MCHAR* imode, unsigned int encoding = -1);
void log_to(CharStream* log);
void close_log();
void undo_lookahead();
protected:
virtual void ThrowNotOpenedError() const;
protected:
MaxSDK::Util::BinaryStream* OpenStream(const MCHAR* fn, const MSTR& mode);
};