can not locate the file created by openForWrite()
by jack518 · in Torque Game Builder · 11/10/2009 (12:01 am) · 1 replies
Hi,
I have tried lots of the codes posted for file writing and reading, but they all did not work for me. The file created by openForWrite("game/test.txt") can not be found, but the confusing thing is that I can write and read data from this file. Eventhough I did a deep search in all the harddisks of my PC, but still can not locate the file created. Next is the code:
%filename="game/test.txt";
%fobject = new FileObject();
if(%fobject.openForWrite(%filename))
{
%fobject.writeLine("test test");
%fobject.close();
%fobject.delete();
}
I have tried lots of the codes posted for file writing and reading, but they all did not work for me. The file created by openForWrite("game/test.txt") can not be found, but the confusing thing is that I can write and read data from this file. Eventhough I did a deep search in all the harddisks of my PC, but still can not locate the file created. Next is the code:
%filename="game/test.txt";
%fobject = new FileObject();
if(%fobject.openForWrite(%filename))
{
%fobject.writeLine("test test");
%fobject.close();
%fobject.delete();
}
Associate William Lee Sims
Machine Code Games