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.eways.batchext
Interface LocalFileProvider

All Known Implementing Classes:
  LocalFileProviderImpl

    public interface LocalFileProvider

It is used to expose a group of local file functions.

Method Summary
`boolean` | `append(java.lang.String srcFileName, java.lang.String destFileName)` Append the contents of the source file to the destination file.
`void` | `copy(java.lang.String srcFileName, java.lang.String destFileName)` Copy the contents of the source file to the destination file.
`void` | `delete(java.lang.String fileName)` Delete the file.
`com.stc.eways.common.eway.standalone.streaming.FileInputStream` | `getFileInputStream(java.lang.String name)`
`java.io.FileOutputStream` | `getFileOutputStream(java.lang.String name, boolean append)`
`LocalFileName` | `getFirstFileName(java.lang.String directory, boolean directoryIsRegEx, java.lang.String file, boolean fileIsRegEx)` Get the first file name matching the specified parameters.
`void` | `initialize(LocalFileETD etd)`
`void` | `mkdir(java.lang.String dirName)` Create the named directory, returning true if and only if the directory was created; false otherwise.
`void` | `mkdirs(java.lang.String dirName)` Create the named directory, including any necessary but nonexistent parent directories.
`void` | `rename(java.lang.String srcFileName, java.lang.String destFileName)` Rename the source file to the destination file.
`boolean` | `reset()`

Method Detail

### initialize

    void initialize(LocalFileETD etd)

### reset

    boolean reset()

### append

    boolean append(java.lang.String srcFileName,
                   java.lang.String destFileName)

  Append the contents of the source file to the destination file. If the destination file does not exist, it is created.

  Parameters:
    `srcFileName` - The full name of source file.
    `destFileName` - The full name of destination file.
  Returns:
    True if successfully completed, false if not.

### copy

    void copy(java.lang.String srcFileName,
              java.lang.String destFileName)
              throws LocalFileException

  Copy the contents of the source file to the destination file. If the destination file does not exist, it is created.

  Parameters:
    `srcFileName` - The full name of source file.
    `destFileName` - The full name of destination file.
  Throws:
    `LocalFileException`

### delete

    void delete(java.lang.String fileName)
                throws LocalFileException

  Delete the file.

  Parameters:
    `fileName` - The full file name.
  Throws:
    `LocalFileException`

### mkdir

    void mkdir(java.lang.String dirName)
               throws LocalFileException

  Create the named directory, returning true if and only if the directory was created; false otherwise. See another method mkdirs(String dirName).

  Parameters:
    `dirName` - A valid directory name to be created.
  Throws:
    `LocalFileException`

### mkdirs

    void mkdirs(java.lang.String dirName)
                throws LocalFileException

  Create the named directory, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories. See another method mkdir(String dirName).

  Parameters:
    `dirName` - A valid directory name to be created.
  Throws:
    `LocalFileException`

### rename

    void rename(java.lang.String srcFileName,
                java.lang.String destFileName)
                throws LocalFileException

  Rename the source file to the destination file. Note: When moving or renaming a file, the destination volume must be the same as the source volume.

  Parameters:
    `srcFileName` - The full name of source file.
    `destFileName` - The full name of destination file.
  Throws:
    `LocalFileException`

### getFirstFileName

    LocalFileName getFirstFileName(java.lang.String directory,
                                   boolean directoryIsRegEx,
                                   java.lang.String file,
                                   boolean fileIsRegEx)

  Get the first file name matching the specified parameters.

  Parameters:
    `directory` - The directory name or RegEx.
    `directoryIsPattern` - Indicates whether the directory parameter is a RegEx.
    `file` - The file name or RegEx.
    `fileIsPattern` - Indicates whether the file parameter is a RegEx.
  Returns:
    The file name found or null if none.

### getFileInputStream

    com.stc.eways.common.eway.standalone.streaming.FileInputStream getFileInputStream(java.lang.String name)
                                                                                      throws java.io.FileNotFoundException

  Throws:
    `java.io.FileNotFoundException`

### getFileOutputStream

    java.io.FileOutputStream getFileOutputStream(java.lang.String name,
                                                 boolean append)
                                                 throws java.io.FileNotFoundException,
                                                        LocalFileException

  Throws:
    `java.io.FileNotFoundException`
    `LocalFileException`

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