|
TorqueScript
0.2
|
A FileObject is a class that may be used to interact with the filesystem provided by the PlatformContext configured with the interpreter. More...
#include <fileobject.hpp>


Public Member Functions | |
| FileObject (Interpreter *interpreter) | |
| bool | openForWrite (const std::string &path) |
| Opens a file at the specified path in write-only mode. More... | |
| bool | openForRead (const std::string &path) |
| bool | isEOF () |
| std::string | readLine () |
| void | write (const std::string &written) |
| Writes a string to the file, if the FileObject has been opened with write mode enabled. More... | |
| void | close () |
Public Member Functions inherited from TorqueScript::ConsoleObject | |
| ConsoleObject (Interpreter *interpreter) | |
| StoredValue * | getTaggedField (const std::string &name) |
| Retrieves a tagged field by name from the object. More... | |
| void | setTaggedField (const std::string &name, StoredValue value) |
| Sets a tagged field by name on the object. More... | |
| virtual std::string | getClassName ()=0 |
| Retrieves the class name of this ConsoleObject instance. More... | |
| virtual bool | addChild (std::shared_ptr< ConsoleObject > child) |
Static Public Member Functions | |
| static void | initializeMemberFields (ConsoleObjectDescriptor *descriptor) |
| static ConsoleObject * | instantiateFromDescriptor (Interpreter *interpreter, ObjectInstantiationDescriptor &descriptor) |
Additional Inherited Members | |
Protected Attributes inherited from TorqueScript::ConsoleObject | |
| Interpreter * | mInterpreter |
| std::unordered_map< std::string, StoredValue > | mTaggedFields |
| A mapping of tagged field names to their stored values. | |
A FileObject is a class that may be used to interact with the filesystem provided by the PlatformContext configured with the interpreter.
| bool TorqueScript::FileObject::openForWrite | ( | const std::string & | path | ) |
Opens a file at the specified path in write-only mode.
| path | The file to open. |
| void TorqueScript::FileObject::write | ( | const std::string & | written | ) |
Writes a string to the file, if the FileObject has been opened with write mode enabled.
| written | The string data to write to the file. |