Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.util.io
Class FileUtil

    java.lang.Object
      org.apache.tomcat.util.io.FileUtil

public class FileUtil
extends java.lang.Object

Constructor Summary
`FileUtil()`

Method Summary
`static java.lang.String` | `catPath(java.lang.String lookupPath, java.lang.String path)` Will concatenate 2 paths, dealing with ..
`static void` | `clearDir(java.io.File dir)`
`static void` | `expand(java.lang.String src, java.lang.String dest)`
`static java.lang.String` | `getBase(java.lang.String path)` Name without path and extension.
`static java.lang.String` | `getCanonicalPath(java.lang.String name)`
`static java.io.File` | `getConfigFile(java.io.File base, java.io.File configDir, java.lang.String defaultF)`
`static java.lang.String` | `getExtension(java.lang.String path)`
`static boolean` | `isAbsolute(java.lang.String path)`
`static java.io.File[]` | `listFiles(java.io.File dir)`
`static java.lang.String` | `patch(java.lang.String path)`
`static java.lang.String` | `removeLast(java.lang.String s)`
`static java.lang.String` | `safePath(java.lang.String base, java.lang.String path)` All the safety checks from getRealPath() and DefaultServlet.
`static java.lang.String` | `safePath(java.lang.String base, java.lang.String path, boolean caseSf)` All the safety checks from getRealPath() and DefaultServlet.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileUtil

    public FileUtil()

Method Detail

### listFiles

    public static java.io.File[] listFiles(java.io.File dir)

### catPath

    public static java.lang.String catPath(java.lang.String lookupPath,
                                           java.lang.String path)

  Will concatenate 2 paths, dealing with .. ( /a/b/c + d = /a/b/d, /a/b/c + ../d = /a/d ) Used in Request.getRD

  Returns:
    null if error occurs

### safePath

    public static java.lang.String safePath(java.lang.String base,
                                            java.lang.String path)

  All the safety checks from getRealPath() and DefaultServlet.

### safePath

    public static java.lang.String safePath(java.lang.String base,
                                            java.lang.String path,
                                            boolean caseSf)

  All the safety checks from getRealPath() and DefaultServlet.

### patch

    public static java.lang.String patch(java.lang.String path)

### isAbsolute

    public static boolean isAbsolute(java.lang.String path)

### getCanonicalPath

    public static java.lang.String getCanonicalPath(java.lang.String name)

### removeLast

    public static java.lang.String removeLast(java.lang.String s)

### getExtension

    public static java.lang.String getExtension(java.lang.String path)

### getBase

    public static java.lang.String getBase(java.lang.String path)

  Name without path and extension.

### expand

    public static void expand(java.lang.String src,
                              java.lang.String dest)
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### clearDir

    public static void clearDir(java.io.File dir)

### getConfigFile

    public static java.io.File getConfigFile(java.io.File base,
                                             java.io.File configDir,
                                             java.lang.String defaultF)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.