1*2de1965aSWill Schurman // Copyright 2015-present 650 Industries. All rights reserved.
2*2de1965aSWill Schurman package host.exp.exponent.utils
3*2de1965aSWill Schurman 
4*2de1965aSWill Schurman import java.io.File
5*2de1965aSWill Schurman import java.io.IOException
6*2de1965aSWill Schurman 
7*2de1965aSWill Schurman object ExpFileUtils {
8*2de1965aSWill Schurman   @Throws(IOException::class)
ensureDirExistsnull9*2de1965aSWill Schurman   fun ensureDirExists(dir: File): File {
10*2de1965aSWill Schurman     if (!(dir.isDirectory || dir.mkdirs())) {
11*2de1965aSWill Schurman       throw IOException("Couldn't create directory '$dir'")
12*2de1965aSWill Schurman     }
13*2de1965aSWill Schurman     return dir
14*2de1965aSWill Schurman   }
15*2de1965aSWill Schurman }
16