com.microfocus.awm.model

## Interface IFileUtilities

-     public interface IFileUtilities

  The basic Interface for file operations on the remote system, including reading and writing of remote files.

  This interface is not intended to be implemented by clients.

  Author:
    Micro Focus

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createFile(ISystemImage pImg, java.lang.String pFileName, IFileAttributes<?,?> pFileAttributes, org.eclipse.core.runtime.IProgressMonitor pMon)` Creates a new file on the remote system.
    `void` | `deleteDataset(ISystemImage pImage, java.lang.String pDatasetName, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Deprecated. Use the general method `deleteFile(ISystemImage, String, IProgressMonitor)` instead.
    `void` | `deleteFile(ISystemImage pImage, java.lang.String pFileName, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Deletes a file.
    `IRemoteFile[]` | `getChildren(ISystemImage pImage, java.lang.String pResourceName, java.lang.String pFilter, org.eclipse.core.runtime.IProgressMonitor pMon)` Gets children of a resource with the option to filter them.
    `java.util.List<java.io.InputStream>` | `getContainerContents(ISystemImage pImg, java.lang.String pContainerName, org.eclipse.core.runtime.IProgressMonitor pMon)` Returns contents of every child from the given container.
    `IGetDataResponse` | `getContents(ISystemImage pImg, java.lang.String pFileName, boolean pExclusive, ERecallMethod pRecall, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Get contents of a mainframe data set.
    `IFileAttributes<?,?>` | `getFileAttributes(ISystemImage pImage, java.lang.String pFileName, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Gets the attributes of a file.
    `boolean` | `isFileExisting(ISystemImage pImg, java.lang.String pParmFilePath, org.eclipse.core.runtime.IProgressMonitor pMon)` Verifies the existence of a file.
    `void` | `renameFile(ISystemImage pImage, java.lang.String pOldName, java.lang.String pNewName, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Renames a file.
    `IRemoteFile[]` | `resolveFilter(ISystemImage pImage, java.lang.String pFilter, org.eclipse.core.runtime.IProgressMonitor pMon)` Returns all files matching the given filter pattern.
    `void` | `setContents(ISystemImage pImg, java.lang.String pFileName, java.io.InputStream pIS, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Writes data in a mainframe data set (sequential or member of PDS).

- - ### Method Detail

    - #### getContents

          IGetDataResponse getContents(ISystemImage pImg,
                                       java.lang.String pFileName,
                                       boolean pExclusive,
                                       ERecallMethod pRecall,
                                       org.eclipse.core.runtime.IProgressMonitor pMonitor)
                                throws java.io.IOException

      Get contents of a mainframe data set.
      Parameters:
        `pImg` - The remote system image
        `pFileName` - fully qualified file name
        `pExclusive` - if `true`, the user gets exclusive access for the file
        `pRecall` - recall method, if the file on the remote system is migrated ( `ERecallMethod.NORECALL`, `ERecallMethod.WAIT`, `ERecallMethod.NOWAIT`)
        `pMonitor` - progress monitor or `null`
      Returns:
        the contents of the mainframe file
      Throws:
        `java.io.IOException` - if an error occurred during the request

    - #### setContents

          void setContents(ISystemImage pImg,
                           java.lang.String pFileName,
                           java.io.InputStream pIS,
                           org.eclipse.core.runtime.IProgressMonitor pMonitor)
                    throws java.io.IOException

      Writes data in a mainframe data set (sequential or member of PDS).

      The data set or the member must already exist.

      Parameters:
        `pImg` - The remote system image
        `pFileName` - fully qualified file name
        `pIS` - input stream with the content for the data set
        `pMonitor` - progress monitor or `null`
      Throws:
        `java.io.IOException` - if an error occurred during the request

    - #### isFileExisting

          boolean isFileExisting(ISystemImage pImg,
                                 java.lang.String pParmFilePath,
                                 org.eclipse.core.runtime.IProgressMonitor pMon)
                          throws java.io.IOException

      Verifies the existence of a file.
      Parameters:
        `pImg` - The remote system image
        `pParmFilePath` - fully qualified file name
        `pMon` - progress monitor or `null`
      Returns:
        `true` if the file exists, otherwise false
      Throws:
        `java.io.IOException` - if an error occurred during the request

    - #### createFile

          void createFile(ISystemImage pImg,
                          java.lang.String pFileName,
                          IFileAttributes<?,?> pFileAttributes,
                          org.eclipse.core.runtime.IProgressMonitor pMon)
                   throws java.io.IOException

      Creates a new file on the remote system.
      Parameters:
        `pImg` - The remote system image
        `pFileName` - fully qualified name of the new file
        `pFileAttributes` - attributes of the new file
        `pMon` - progress monitor
      Throws:
        `java.io.IOException` - if creating the file fails

    - #### getContainerContents

          java.util.List<java.io.InputStream> getContainerContents(ISystemImage pImg,
                                                                   java.lang.String pContainerName,
                                                                   org.eclipse.core.runtime.IProgressMonitor pMon)
                                                            throws java.io.IOException

      Returns contents of every child from the given container.
      Parameters:
        `pImg` - The remote system image
        `pContainerName` - the fully qualified name of the container
        `pMon` - progress monitor
      Returns:
        list of input streams for every containing file
      Throws:
        `java.io.IOException` - if an I/O exception occurs

    - #### getFileAttributes

          IFileAttributes<?,?> getFileAttributes(ISystemImage pImage,
                                                 java.lang.String pFileName,
                                                 org.eclipse.core.runtime.IProgressMonitor pMonitor)
                                          throws java.io.IOException

      Gets the attributes of a file.
      Parameters:
        `pImage` - the remote system image
        `pFileName` - fully qualified file name
        `pMonitor` - progress monitor
      Returns:
        the file's attributes
      Throws:
        `java.io.IOException` - if the file's attributes cannot be obtained for any reason

    - #### deleteDataset

          @Deprecated
          void deleteDataset(ISystemImage pImage,
                                          java.lang.String pDatasetName,
                                          org.eclipse.core.runtime.IProgressMonitor pMonitor)
                                   throws java.io.IOException

      Deprecated. Use the general method `deleteFile(ISystemImage, String, IProgressMonitor)` instead.
      Delete of a mainframe data set.
      Parameters:
        `pImage` - the remote system image
        `pDatasetName` - the name of the data set
        `pMonitor` - progress monitor
      Throws:
        `java.io.IOException` - if an I/O exception occurs

    - #### deleteFile

          void deleteFile(ISystemImage pImage,
                          java.lang.String pFileName,
                          org.eclipse.core.runtime.IProgressMonitor pMonitor)
                   throws java.io.IOException

      Deletes a file.
      Parameters:
        `pImage` - the system image of the file
        `pFileName` - fully qualified name of the file to be deleted
        `pMonitor` - progress monitor
      Throws:
        `java.io.IOException` - if deleting the file fails

    - #### renameFile

          void renameFile(ISystemImage pImage,
                          java.lang.String pOldName,
                          java.lang.String pNewName,
                          org.eclipse.core.runtime.IProgressMonitor pMonitor)
                   throws java.io.IOException

      Renames a file.
      Parameters:
        `pImage` - The remote system image
        `pOldName` - fully qualified name of the file to rename
        `pNewName` - new fully qualified file name
        `pMonitor` - progress monitor
      Throws:
        `java.io.IOException` - if an I/O exception occurs

    - #### getChildren

          IRemoteFile[] getChildren(ISystemImage pImage,
                                    java.lang.String pResourceName,
                                    java.lang.String pFilter,
                                    org.eclipse.core.runtime.IProgressMonitor pMon)
                             throws TaurusCoreException

      Gets children of a resource with the option to filter them.
      Parameters:
        `pImage` - The remote system image
        `pResourceName` - the fully qualified resource name to get children from
        `pFilter` - the filter. Can be `null` to return all children.
        `pMon` - a progress monitor
      Returns:
        a list of children. Can return an empty list but not `null`.
      Throws:
        `TaurusCoreException` - if children cannot be obtained for any reason

    - #### resolveFilter

          IRemoteFile[] resolveFilter(ISystemImage pImage,
                                      java.lang.String pFilter,
                                      org.eclipse.core.runtime.IProgressMonitor pMon)
                               throws TaurusCoreException

      Returns all files matching the given filter pattern.
      Parameters:
        `pImage` - The remote system image
        `pFilter` - the filter pattern
        `pMon` - a progress monitor
      Returns:
        a list of children. Can return an empty list but not `null`.
      Throws:
        `TaurusCoreException` - if children cannot be obtained for any reason

Copyright © 2015 Micro Focus GmbH. All rights reserved.