be.ac.ulg.montefiore.run.totem.util
Class FileFunctions

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.util.FileFunctions

public class FileFunctions
extends java.lang.Object

Some functions that manipulate files.

Creation date: 01-Feb-2005 11:58:05

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be)

Constructor Summary
FileFunctions()
           
 
Method Summary
static void copy(java.net.URL inFile, java.lang.String outFile)
          Copy a file frow an URL to the outFile
static java.lang.String getFilenameFromContext(java.lang.String context, java.lang.String fileName)
          Returns the canonical filename of a file interpreted from the given context.
If the filename correspond to an absolute file, the canonical path corresponding to this file is returned. If the filename is relative, it is interpreted relative to the context directory if it is a directory, or from the directory parent to the context, if it is a regular file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFunctions

public FileFunctions()
Method Detail

copy

public static void copy(java.net.URL inFile,
                        java.lang.String outFile)
                 throws java.io.IOException
Copy a file frow an URL to the outFile

Parameters:
inFile -
outFile -
Throws:
java.io.IOException

getFilenameFromContext

public static java.lang.String getFilenameFromContext(java.lang.String context,
                                                      java.lang.String fileName)
Returns the canonical filename of a file interpreted from the given context.

Parameters:
context -
fileName -
Returns:
the canonical path of the file fileName interpreted in the context context


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.