Forum Discussion
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?
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
- richie6 years agoCommunity Hero
apologies i shouldve laid out my current research on the subject....i wasnt asking for someone to do my work for me per se, i thought this would be a 2 line bit if code as per my current googling so far.
as i say...ive already been googling and theres a single post on stackoverflow about wiping a files contents without deleting the file itself and the post describes a couple of possibles but, i tried playing with it I found the post is a little confusing because the question was edited subsequent to it being initially posted. im travelling at moment (typing on my phone) and i'll post what ive got so far....i actually only posted the query once my other searches and playing with the thing let me down.
everytime you guys help me with the groovy im learning something new...i dont want to be spoonfed the answer cos I dont learn anything - I ask for help when I've run out of ideas
cheers- richie6 years agoCommunity Hero
hahaha!
yeah thats the stackoverflow post I found! :)
- groovyguy6 years agoChampion Level 1
As always, the more detail you can provide will help get to a solution faster. Especially if you have done the research and already have a groovy script written that isn't working. That gives us somewhere to start troubleshooting and debugging!
Related Content
- 10 months agoKimdoengart
- 2 years agoTaz
- 4 years agoavin
- 2 years agoTanIlak