com.ibm.ftt.resources.core.physical
Interface IPhysicalFile

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IPhysicalResource
All Known Subinterfaces:
ZOSDataSetMember, ZOSSequentialDataSet, ZOSVsamDataSet

public interface IPhysicalFile
extends IPhysicalResource

Represents a physical file on the remote file system.


Field Summary
static String COPY_RIGHT
           
 
Method Summary
 void appendContent(InputStream source, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor)
          Appends the contents of the given input stream to this file.
 void appendContent(InputStream source, boolean force, String encoding, org.eclipse.core.runtime.IProgressMonitor monitor)
          Appends the contents of the given input stream to this file.
 void create(InputStream source, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates a new file.
 void create(InputStream source, boolean force, String encoding, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates a new file.
 String getCharset()
           
 InputStream getContents()
          Returns an open input stream on the contents of this file.
 String getFileExtension()
          Returns the file extension portion of this resource's name.
 void setContents(InputStream source, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor)
          Sets the contents of this file to the bytes in the given input stream.
 void setContents(InputStream source, boolean force, String encoding, org.eclipse.core.runtime.IProgressMonitor monitor)
          Sets the contents of this file to the bytes in the given input stream.
 void setFileExtension(String value)
          Sets the file extension portion of this resource's name.
 
Methods inherited from interface com.ibm.ftt.resources.core.physical.IPhysicalResource
delete, deleteOverriddenPropertiesInCategory, deleteOverride, exists, getCurrentPropertyGroup, getFullPath, getModificationStamp, getModificationStamp, getName, getOverriddenProperties, getParent, getPersistentProperty, getResourcePublisher, getSessionProperty, refresh, rename, setCurrentPropertyGroup, setOverride, setPersistentProperty, setSessionProperty
 

Field Detail

COPY_RIGHT

static final String COPY_RIGHT
See Also:
Constant Field Values
Method Detail

appendContent

void appendContent(InputStream source,
                   boolean force,
                   org.eclipse.core.runtime.IProgressMonitor monitor)
                   throws OperationFailedException
Appends the contents of the given input stream to this file. Default local file encoding is assumed for the input stream.

This is a convenience method, equivalent to:

 appendContent(source, force, null, monitor);
 

Parameters:
source - an input stream containing the contents to append
force - Currently not used. It is recommended to set this to true for now.
monitor - a progress monitor, or null if progress reporting is not desired
Throws:
OperationFailedException - if the append operation failed
See Also:
appendContent(InputStream, boolean, String, IProgressMonitor)

appendContent

void appendContent(InputStream source,
                   boolean force,
                   String encoding,
                   org.eclipse.core.runtime.IProgressMonitor monitor)
                   throws OperationFailedException
Appends the contents of the given input stream to this file.

Parameters:
source - an input stream containing the contents to append
force - Currently not used. It is recommended to set this to true for now.
encoding - the file encoding of the source input stream. If null is specified, the default local file encoding is used
monitor - a progress monitor, or null if progress reporting is not desired
Throws:
OperationFailedException - if the append operation failed
See Also:
appendContent(InputStream, boolean, IProgressMonitor)

getCharset

String getCharset()
                  throws OperationFailedException
Returns:
the name of the char set that should be used to interpret the contents of this file.
Throws:
OperationFailedException
See Also:
getContents()

getContents

InputStream getContents()
                        throws OperationFailedException
Returns an open input stream on the contents of this file. The client is responsible for closing the stream when finished.

Returns:
an input stream containing the contents of this file
Throws:
OperationFailedException - if failed to get contents
See Also:
getCharset()

setContents

void setContents(InputStream source,
                 boolean force,
                 org.eclipse.core.runtime.IProgressMonitor monitor)
                 throws OperationFailedException
Sets the contents of this file to the bytes in the given input stream. Default local file encoding is assumed for the input stream's encoding.

Parameters:
source - an input stream containing the new contents of this file
force - Currently not used. It is recommended to set this to true for now.
monitor - a progress monitor, or null if progress reporting is not desired
Throws:
OperationFailedException - if failed to set the contents

setContents

void setContents(InputStream source,
                 boolean force,
                 String encoding,
                 org.eclipse.core.runtime.IProgressMonitor monitor)
                 throws OperationFailedException
Sets the contents of this file to the bytes in the given input stream.

Parameters:
source - an input stream containing the new contents of this file
force - Currently not used. It is recommended to set this to true for now.
encoding - the file encoding of the source input stream. If null is specified, the default local file encoding is used
monitor - a progress monitor, or null if progress reporting is not desired
Throws:
OperationFailedException - if failed to set the contents

create

void create(InputStream source,
            boolean force,
            org.eclipse.core.runtime.IProgressMonitor monitor)
            throws OperationFailedException
Creates a new file. Default local file encoding is assumed for the input stream's encoding.

Parameters:
source - an input stream containing the initial contents of this file
force - Currently not used. It is recommended to set this to true for now.
monitor - a progress monitor, or null if progress reporting is not desired
Throws:
OperationFailedException - if failed to create the file

create

void create(InputStream source,
            boolean force,
            String encoding,
            org.eclipse.core.runtime.IProgressMonitor monitor)
            throws OperationFailedException
Creates a new file.

Parameters:
source - an input stream containing the initial contents of this file
force - Currently not used. It is recommended to set this to true for now.
encoding - the file encoding of the source input stream. If null is specified, the default local file encoding is used
monitor - a progress monitor, or null if progress reporting is not desired
Throws:
OperationFailedException - if failed to create the file

getFileExtension

String getFileExtension()
Returns the file extension portion of this resource's name.

The file extension portion is defined as the string following the last period (".") character in the name. If there is no period in the name, the path has no file extension portion. If the name ends in a period, the file extension portion is the empty string.

Returns:
the file extension or an empty string
See Also:
setFileExtension(String), getNameWithoutExtension()

setFileExtension

void setFileExtension(String value)
Sets the file extension portion of this resource's name.

Parameters:
value - the new extension to set
See Also:
getFileExtension()