|
Post by mknarr on Dec 18, 2023 10:44:44 GMT -5
Rod. I looked into the app folders under LB, my app folder and others first and could not find it. I also looked in the LB folder under Program Files (x86) and not there either. That's why I mended up using Explorer and as you pointed out didn't find it that way either. I still think that since a folder was not used, the file was never created.
|
|
|
Post by Rod on Dec 18, 2023 11:50:15 GMT -5
No, the file is created. To prove it to yourself add code to the first example to open the file after it has been closed and read it in. You will get the file. The file exists and is available to Liberty. It is just Windows that is hiding it from you.
I will code the proof tomorrow unless someone else gets it done before me. Printing StartupDir$ and DefaultDir$ will add clarity but we basically need to open a file, write one word, close it, open it immediately and read the word back in. That will prove the file does indeed exist.
|
|
|
Post by Rod on Dec 19, 2023 13:30:22 GMT -5
This would not work if the file was not created.
open "myfile.txt" for output as #myHandle print #myHandle, "Hello" print #myHandle, "World!" close #myHandle
open "myfile.txt" for input as #myHandle line input #myHandle, item$ print item$ line input #myHandle, item$ print item$ close #myHandle end
|
|
|
Post by Rod on Dec 20, 2023 6:46:22 GMT -5
Just to see if it was the cache issue and to see if it was only available once Liberty closed I changed the code. Same result, the file exists and is readily found by Explorer, in the correct directory, the DefaultDir$ This is even with Liberty pause at the wait command.
print StartupDir$ print DefaultDir$ open "myfile.txt" for output as #myHandle print #myHandle, "Hello" print #myHandle, "World!" close #myHandle
open "myfile.txt" for input as #myHandle line input #myHandle, item$ print item$ line input #myHandle, item$ print item$ close #myHandle wait
|
|
|
Post by Carl Gundel on Dec 20, 2023 14:14:29 GMT -5
No, the file is created. To prove it to yourself add code to the first example to open the file after it has been closed and read it in. You will get the file. The file exists and is available to Liberty. It is just Windows that is hiding it from you. I will code the proof tomorrow unless someone else gets it done before me. Printing StartupDir$ and DefaultDir$ will add clarity but we basically need to open a file, write one word, close it, open it immediately and read the word back in. That will prove the file does indeed exist. Or write the file, and then launch Notepad from LB to open the file?
|
|