org.eclipse.gmt.weaver.plugin.util
Class UtilFile

java.lang.Object
  extended by org.eclipse.gmt.weaver.plugin.util.UtilFile

public class UtilFile
extends java.lang.Object

This class contains convenient static methods for working with IO files

Since:
1.0

Constructor Summary
UtilFile()
           
 
Method Summary
static java.io.File getFile(java.lang.String pathname)
          Returns the file (corresponding to this pathname)
static java.lang.String getFileExtension(java.lang.String filename)
          Gets the extension of a file
static java.lang.String getFileNameFromPath(java.lang.String path)
          Returns the name of the file
static java.io.File getRepertory(java.lang.String pathname)
          Returns the directory (corresponding to this pathname)
static java.io.InputStream getStreamForFile(java.lang.String fileName)
          returns the stream for the file pathname
static boolean testIfFileExist(java.lang.String filePath)
          Returns true if file exists (false if file doesn't exist)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UtilFile

public UtilFile()
Method Detail

getStreamForFile

public static java.io.InputStream getStreamForFile(java.lang.String fileName)
                                            throws java.io.FileNotFoundException
returns the stream for the file pathname

Parameters:
fileName - : String
Returns:
InputStream
Throws:
java.io.FileNotFoundException

testIfFileExist

public static boolean testIfFileExist(java.lang.String filePath)
Returns true if file exists (false if file doesn't exist)

Parameters:
path - : String
Returns:
boolean

getFileNameFromPath

public static java.lang.String getFileNameFromPath(java.lang.String path)
Returns the name of the file

Parameters:
path - : String
Returns:
String

getFileExtension

public static java.lang.String getFileExtension(java.lang.String filename)
Gets the extension of a file

Parameters:
filename -
Returns:

getFile

public static java.io.File getFile(java.lang.String pathname)
Returns the file (corresponding to this pathname)

Parameters:
pathname -
Returns:

getRepertory

public static java.io.File getRepertory(java.lang.String pathname)
Returns the directory (corresponding to this pathname)

Parameters:
pathname -
Returns: