Last active
August 29, 2015 14:16
-
-
Save rmorenobello/bd307d0334a54d9178f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tutorial on File: http://tutorials.jenkov.com/java-io/file.html | |
def getFileWithPath = { rutaCarpeta, nom -> | |
def homePath = System.getProperty('user.home').replace('\\','/') | |
println "home Path: " + homePath | |
def directory = new File(homePath.concat("/${rutaCarpeta}/")) | |
if(!directory.exists()){ | |
boolean dirCreated = directory.mkdirs() | |
assert dirCreated | |
} | |
assert directory.exists() | |
def file = new File(directory,"${nom}") | |
assert file.exists() | |
return file | |
// new File(System.getProperty('user.home').replace('\\','/').concat("/CircuitCatalunyaF1_tests/${nom}")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment