Forum Discussion
groovyguy
7 years agoCommunity Hero
Not to be too forward, but it wouldn't hurt to do so. ;) We're here to help, sure, but on our own free time and as we are able. We're also here to help in the context of ReadyAPI and working with it. We are not necessarily to do the work for you. Instead I'd rather help you hone your groovy skills. I assume you are looking to clear the contents of a file that the Data Sink wrote to, correct?
groovyguy
7 years agoCommunity Hero
For some reason it lost the second half of my message. What you are looking for is definitely doable via groovy, and there are a myriad of examples available.
Here's one pertinent article about what I think you are trying: https://stackoverflow.com/questions/45549160/how-to-clear-a-text-file-without-deleting-it-using-groovy