Skip to content

Instantly share code, notes, and snippets.

@wiz4host
Forked from aaukhatov/WriteToFile.groovy
Created April 6, 2021 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wiz4host/8ad3fa7d2e06041da97a8de578f4825a to your computer and use it in GitHub Desktop.
Save wiz4host/8ad3fa7d2e06041da97a8de578f4825a to your computer and use it in GitHub Desktop.
How to write String to File by Groovy
String content = 'Some text'
def myFile = new File('mySuperFile.txt')
myFile.write(content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment