Posted: Sat Feb 27, 2021 7:28 am Post subject: bug? saveToFileNoError does not report status
tryin to open file and save it with saveToFileNoError
saveToFileNoError does not seem to report status neither true nor false
this API does save a file, am I using it incorrectly?
Code:
local path = "C:\\Games\\file.txt" --both folder and file exist
local path2 = "C:\\Gamess\\file.txt.bak" --folder does not exist
local original = createMemoryStream()
local r,e;
r,e=original.loadFromFileNoError(path)
print(tostring(r).."-load no error")
r,e = original.saveToFileNoError(path..".bak")
print(tostring(r).."-save1 with no error")
r,e = original.saveToFileNoError(path2)
print(tostring(r).."-save2 with error")
original.destroy()
Code:
true-load no error
nil-save1 with no error
nil-save2 with error
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum