overwolf.extensions.io.writeTextFile(overwolf.io.paths.localAppData,“SampleLog”, “Message”,console.log);
or
overwolf.extensions.io.writeTextFile(overwolf.extensions.io.enums.StorageSpace.localAppData,“SampleLog”, “Message” ,console.log);
overwolf.extensions.io.writeTextFile(overwolf.io.paths.localAppData,“SampleLog”, “Message”,console.log);
or
overwolf.extensions.io.writeTextFile(overwolf.extensions.io.enums.StorageSpace.localAppData,“SampleLog”, “Message” ,console.log);
@sureshgoud14 please try replacing the space parameter with "appData"
or "overwolf.extensions.io.enums.StorageSpace.appData"
Can you provide me a sample for overwolf.io.writeFileContents method. because overwolf.extensions.io.writeTextFile will take enum of pictures,videos & appData. If we wanna save text file in other location this writeFileContents would be useful. It is not working at my end.
here is the sample code:
overwolf.io.writeFileContents(overwolf.io.paths.localAppData+“//File”,“Content”,overwolf.io.enums.eEncoding.UTF8,false,function(result){
overwolf.extensions.io.writeTextFile(overwolf.io.paths.localAppData,“Log”, JSON.stringify(result,null,2),console.log);
});
//Nothing is getting created.
@sureshgoud14 Hi,
I simplified your call in order to debug it and convert the callback to a simple console.log
call.
It returns success as expected:
overwolf.io.writeFileContents(overwolf.io.paths.localAppData+"//File","Content",overwolf.io.enums.eEncoding.UTF8,false,console.log)
The above command created successfully File.txt
in the overwolf.io.paths.localAppData
directory. (In my case it’s C:\Users\Eran\AppData\Local
)
Thank you.It is working