com.threerings.getdown.util
Class FileUtil

java.lang.Object
  extended by com.threerings.getdown.util.FileUtil

public class FileUtil
extends Object

File related utilities.


Constructor Summary
FileUtil()
           
 
Method Summary
static List<String> readLines(Reader in)
          Reads the contents of the supplied input stream into a list of lines.
static boolean renameTo(File source, File dest)
          Gets the specified source file to the specified destination file by hook or crook.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

renameTo

public static boolean renameTo(File source,
                               File dest)
Gets the specified source file to the specified destination file by hook or crook. Windows has all sorts of problems which we work around in this method.

Returns:
true if we managed to get the job done, false otherwise.

readLines

public static List<String> readLines(Reader in)
                              throws IOException
Reads the contents of the supplied input stream into a list of lines. Closes the reader on successful or failed completion.

Throws:
IOException


Copyright © 2013. All Rights Reserved.