Package frc.lib5k.utils
Class FileUtils
- java.lang.Object
-
- frc.lib5k.utils.FileUtils
-
public class FileUtils extends java.lang.Object
Tools for working with the filesystem
-
-
Constructor Summary
Constructors Constructor Description FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
constructDeployPath(java.lang.String filename)
Append a filename to the deploy pathstatic java.lang.String
getDeployPath()
Query WPIlib's filesystem for deploy pathstatic java.lang.String
getHome()
static java.lang.String
readFile(java.lang.String path)
Reads a file, and returns it's contents as a UTF8 string
-
-
-
Method Detail
-
readFile
public static java.lang.String readFile(java.lang.String path) throws java.io.IOException
Reads a file, and returns it's contents as a UTF8 string- Parameters:
path
- File path- Returns:
- File contents
- Throws:
java.io.IOException
-
getDeployPath
public static java.lang.String getDeployPath()
Query WPIlib's filesystem for deploy path- Returns:
- File path of deploy folder
-
constructDeployPath
public static java.lang.String constructDeployPath(java.lang.String filename)
Append a filename to the deploy path- Parameters:
filename
- File name- Returns:
- Deploy path + filename
-
getHome
public static java.lang.String getHome()
-
-