Class 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 path
      static java.lang.String getDeployPath()
      Query WPIlib's filesystem for deploy path
      static 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileUtils

        public FileUtils()
    • 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()