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

## com.endeca.soleng.eac.toolkit.utility
Class FileUtility

    java.lang.Object
      com.endeca.soleng.eac.toolkit.base.EacElement
          com.endeca.soleng.eac.toolkit.utility.Utility
              com.endeca.soleng.eac.toolkit.utility.FileUtility

    public class FileUtility

extends Utility

FileUtility extends the Utility object, exposing methods that wrap the utility web service's listDirectoryContents call. Included in this object are implementations of common methods used to test the existence of files and directories.

Field Summary

Fields inherited from class com.endeca.soleng.eac.toolkit.utility.Utility
`EAC_MAX_TOKEN_LENGTH, ENDECA_CONF, IS_WINDOWS, WINDOWS_MAX_PATH_LENGTH`

Fields inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
`appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir`

Constructor Summary
`FileUtility()`
`FileUtility(java.lang.String appName, java.lang.String eacHost, int eacPort, boolean sslEnabled)` Default (inherited) constructor.

Method Summary
`boolean` | `dirContainsFiles(java.lang.String dir, java.lang.String hostId)` Tests whether there are any files in a directory.
`boolean` | `dirExists(java.lang.String dir, java.lang.String hostId)` Tests whether a specified directory exists.
`boolean` | `fileExists(java.lang.String dir, java.lang.String file, java.lang.String hostId)` Tests whether a specified file exists in a directory.

Methods inherited from class com.endeca.soleng.eac.toolkit.utility.Utility
`buildEacStub, getDirContents, getMaxMissedStatusChecksAllowed, getMaxWaitTimeSeconds, getMinWaitTimeSeconds, getNonNullPositiveLongValueOrDefault, getNumMissedStatusChecks, getSlowPollingIntervalMs, getStandardPollingIntervalMs, getStatus, incrementMissedStatusQueries, initializeEacStub, isActive, isFailed, maximumAllowedTokenLength, run, runInParallel, setElementId, setMaxMissedStatusQueriesAllowed, setMaxWaitSeconds, setMinWaitSeconds, setNumMissedStatusChecks, setPollingIntervalMs, setSlowPollingIntervalMs, start, stop, waitForFinished`

Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
`getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setLockManager, setLogDir, setSslEnabled, setWorkingDir`

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

Constructor Detail

### FileUtility

    public FileUtility(java.lang.String appName,
                       java.lang.String eacHost,
                       int eacPort,
                       boolean sslEnabled)
                throws AppConfigurationException

  Default (inherited) constructor.

  Throws:
    `AppConfigurationException` - If the application name or EAC host is null.

### FileUtility

    public FileUtility()

Method Detail

### fileExists

    public boolean fileExists(java.lang.String dir,
                              java.lang.String file,
                              java.lang.String hostId)
                       throws EacCommunicationException

  Tests whether a specified file exists in a directory.

  Parameters:
    `dir` - Directory in which to search.
    `file` - File name to search for.
    `hostId` - ID of host on which to search.
  Returns:
    Returns true if the file exists, false if it doesn't.
  Throws:
    `EacCommunicationException`

### dirExists

    public boolean dirExists(java.lang.String dir,
                             java.lang.String hostId)
                      throws EacCommunicationException

  Tests whether a specified directory exists. Returns true if a file or directory exists at the specified path.

  Parameters:
    `dir` - Directory to test.
    `hostId` - ID of host on which to search.
  Returns:
    Returns true if the directory exists, false if it doesn't.
  Throws:
    `EacCommunicationException`

### dirContainsFiles

    public boolean dirContainsFiles(java.lang.String dir,
                                    java.lang.String hostId)
                             throws EacCommunicationException

  Tests whether there are any files in a directory.

  Parameters:
    `dir` - Directory in which to search.
    `hostId` - ID of host on which to search.
  Returns:
    Returns true if any file exists in the directory, false if it's empty.
  Throws:
    `EacCommunicationException`

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

Copyright © 2006, 2012, Oracle and/or its affiliates. All rights reserved.

    @VERSION
    PRODUCT: EAC Toolkit (eacToolkit)
    VERSION: 3.2.2
    BUILD:   NONEDEV
    ARCH_OS: n/a
    DATE:    2012-02-28T13:13:15-0500