Package ffx.utilities

Class FileUtils

java.lang.Object
ffx.utilities.FileUtils

public class FileUtils extends Object
FileUtils class.
Since:
1.0
Author:
Michael J. Schnieders
  • Method Details

    • copyInputStreamToTmpFile

      public static String copyInputStreamToTmpFile(InputStream input, String prefix, String name, String suffix) throws IOException
      Returns the file name of a temporary copy of input content.
      Parameters:
      input - The input stream contents are copied to a temporary file.
      prefix - Temporary file prefix.
      name - Temporary file name.
      suffix - Temporary file suffix.
      Returns:
      The temporary file.
      Throws:
      IOException - An IOException is thrown if a temporary file could not be created.
    • relativePathTo

      public static Path relativePathTo(File file)
      Constructs a relative path from the present working directory to a file.
      Parameters:
      file - Construct a relative path to file.
      Returns:
      Relative path to file.