public class FileHelper extends Object
| Constructor and Description |
|---|
FileHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createParentDirs(File f)
Creates any non-existent parent directories for the given file
|
static String |
readFirstLine(File f)
Reads the first line of a file
|
static void |
writeStringToFile(String s,
File f)
Writes a string to a file replacing the entire contents
|
public static String readFirstLine(File f)
f - the file to readpublic static void createParentDirs(File f) throws IOException
f - the file to create parent directories forIOExceptionpublic static void writeStringToFile(String s, File f) throws IOException
s - The string to writef - The file to write toIOExceptionCopyright © 2013 Atlassian. All Rights Reserved.