org.eclipse.xtend.backend.util
Class FileHelper

java.lang.Object
  extended by org.eclipse.xtend.backend.util.FileHelper

public class FileHelper
extends java.lang.Object

Ported from org.eclipse.internal.xpand2.pr.util.FSIO to the backend

Author:
André Arnold

Constructor Summary
FileHelper()
           
 
Method Summary
static java.io.File[] getAllFiles(java.io.File file, java.io.FilenameFilter filter)
           
static java.io.File[] getAllFilesInHierarchy(java.lang.String basePath, java.io.FilenameFilter filter)
           
static java.lang.String normalizePath(java.lang.String filename)
           
static java.lang.String read(java.io.File file, java.lang.String encoding)
           
static java.lang.String read(java.io.Reader reader)
           
static java.lang.String read(java.lang.String filename)
           
static java.lang.String read(java.lang.String filename, java.lang.String encoding)
           
static void write(java.lang.String path, java.lang.CharSequence text)
           
static void write(java.io.Writer writer, java.lang.CharSequence text)
           
static void write(java.io.Writer writer, EfficientLazyString text)
           
static void write(java.io.Writer writer, java.io.Reader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHelper

public FileHelper()
Method Detail

read

public static java.lang.String read(java.lang.String filename)
                             throws java.io.IOException
Throws:
java.io.IOException

read

public static java.lang.String read(java.lang.String filename,
                                    java.lang.String encoding)
                             throws java.io.IOException
Throws:
java.io.IOException

read

public static java.lang.String read(java.io.File file,
                                    java.lang.String encoding)
                             throws java.io.IOException
Throws:
java.io.IOException

read

public static java.lang.String read(java.io.Reader reader)
                             throws java.io.IOException
Parameters:
reader -
Returns:
Throws:
java.io.IOException

write

public static void write(java.io.Writer writer,
                         EfficientLazyString text)
                  throws java.io.IOException
Parameters:
writer -
text -
Throws:
java.io.IOException

write

public static void write(java.io.Writer writer,
                         java.lang.CharSequence text)
                  throws java.io.IOException
Parameters:
writer -
text -
Throws:
java.io.IOException

write

public static void write(java.lang.String path,
                         java.lang.CharSequence text)
                  throws java.io.IOException
Parameters:
writer -
text -
Throws:
java.io.IOException

write

public static void write(java.io.Writer writer,
                         java.io.Reader reader)
                  throws java.io.IOException
Parameters:
writer -
text -
Throws:
java.io.IOException

getAllFiles

public static java.io.File[] getAllFiles(java.io.File file,
                                         java.io.FilenameFilter filter)
                                  throws java.io.IOException
Throws:
java.io.IOException

getAllFilesInHierarchy

public static java.io.File[] getAllFilesInHierarchy(java.lang.String basePath,
                                                    java.io.FilenameFilter filter)
                                             throws java.io.IOException
Throws:
java.io.IOException

normalizePath

public static java.lang.String normalizePath(java.lang.String filename)