Hello! I’m still pretty new. I’ve checked the documentation on this but am not getting the full picture yet.
Here’s my situation: I’m doing some benchmarking and want to test my program on different inputs one at a time. Each time I run the program, I want to save some information to a markdown file. Then I want to change the inputs, run the program again, and append the new information to the same markdown file.
I know that to make a file I use the command touch. Question: I am in a working directory, .atom and have been unable to change this working directory by using cd in the the REPL. Can I have touch() make a file in a different directory? For example, I have a subdirectory in .atom where I am working on this project and I would like to save it here.
Next, I am also having problems appending my file. I created a file in the REPL and am opening it in append mode in my program using open(). I am able to write successfully to the file using write. However, when I run the program again, it overwrites my file. Based on the documentation, it seems like I should be using write!() which is in the LibGit2 library, but the function isn’t recognized when I call it. LibGit2 is installed in my home directory so it should be working. Will write!() work as I think it will and is it depricated? How should I append the file otherwise?
Thanks for your time!