Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for Batch/FTP
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.batchadapter.util
Class FileUtil

    java.lang.Object
      com.stc.connector.batchadapter.util.FileUtil

    public class FileUtil

extends java.lang.Object

jim.fu@sun.com TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
`FileUtil()`

Method Summary
`static void` | `copy(java.lang.String srcDir, java.lang.String srcFile, java.lang.String destDir, java.lang.String destFile)`
`static void` | `delete(java.lang.String dir, java.lang.String file)`
`static java.lang.String` | `escapeBackslash(java.lang.String s)`
`static boolean` | `exists(java.lang.String dir, java.lang.String file)`
`static java.lang.String` | `getFullMessage(java.lang.Exception e)`
`static java.lang.String` | `getLocalPath(java.lang.String dir, java.lang.String file)`
`static java.lang.String` | `getLocalPath2(java.lang.String dir, java.lang.String file)`
`static java.lang.String` | `getPathDesc(java.lang.String dir, java.lang.String file)`
`static java.lang.String` | `getPathDesc(java.lang.String dir, java.lang.String file, boolean dirPatt, boolean filePatt)`
`static java.lang.String` | `getRemotePath(java.lang.String dir, java.lang.String file)`
`static boolean` | `isAbsolute(java.lang.String path)`
`static boolean` | `isEmpty(java.lang.String s)`
`static boolean` | `isEmpty(java.lang.String[] s)` test if all the parts in an array is empty
`static boolean` | `isEmpty(java.lang.String dir, java.lang.String file)` test if a path is empty
`static boolean` | `isLocalAbsolute(java.lang.String path)` check if the given path `path` is absolute
`static void` | `rename(java.lang.String srcDir, java.lang.String srcFile, java.lang.String destDir, java.lang.String destFile)`
`static java.lang.String[]` | `resolveName(com.stc.connector.TransferParams params, java.lang.String dir, java.lang.String file, boolean isRemote)`

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

### copy

    public static void copy(java.lang.String srcDir,
                            java.lang.String srcFile,
                            java.lang.String destDir,
                            java.lang.String destFile)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### exists

    public static boolean exists(java.lang.String dir,
                                 java.lang.String file)
                          throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### rename

    public static void rename(java.lang.String srcDir,
                              java.lang.String srcFile,
                              java.lang.String destDir,
                              java.lang.String destFile)
                       throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### delete

    public static void delete(java.lang.String dir,
                              java.lang.String file)
                       throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### resolveName

    public static java.lang.String[] resolveName(com.stc.connector.TransferParams params,
                                                 java.lang.String dir,
                                                 java.lang.String file,
                                                 boolean isRemote)
                                          throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### isAbsolute

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

### isLocalAbsolute

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

  check if the given path `path` is absolute

  Parameters:
    `path` - - the path to be tested
  Returns:
    true - if the path is an absolute one, false otherwise

### isEmpty

    public static boolean isEmpty(java.lang.String[] s)

  test if all the parts in an array is empty

  Parameters:
    `s` - - String[]
  Returns:
    true - all the parts in the string array is empty, false, otherwise;

### isEmpty

    public static boolean isEmpty(java.lang.String dir,
                                  java.lang.String file)

  test if a path is empty

  Parameters:
    `dir` -
    `file` -
  Returns:
    true - is empty path, false otherwise

### isEmpty

    public static boolean isEmpty(java.lang.String s)

### escapeBackslash

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

### getFullMessage

    public static java.lang.String getFullMessage(java.lang.Exception e)

### getLocalPath

    public static java.lang.String getLocalPath(java.lang.String dir,
                                                java.lang.String file)
                                         throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getLocalPath2

    public static java.lang.String getLocalPath2(java.lang.String dir,
                                                 java.lang.String file)

### getRemotePath

    public static java.lang.String getRemotePath(java.lang.String dir,
                                                 java.lang.String file)

### getPathDesc

    public static java.lang.String getPathDesc(java.lang.String dir,
                                               java.lang.String file,
                                               boolean dirPatt,
                                               boolean filePatt)

### getPathDesc

    public static java.lang.String getPathDesc(java.lang.String dir,
                                               java.lang.String file)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for Batch/FTP
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD