public class WorkspaceFileDescriptorReader extends java.lang.Object implements IFileDescriptorReader
IFileDescriptorReader for file descriptors with
the type EFileTypes.WORKSPACE_FILE.| Constructor and Description |
|---|
WorkspaceFileDescriptorReader() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
fileExists(FileDescriptor pFileDescriptor,
IExecutionContext pContext,
org.eclipse.core.runtime.IProgressMonitor pMon)
Checks whether the file exists on the target system.
|
IGetDataResponse |
getContents(FileDescriptor pFileDescr,
IExecutionContext pContext)
Gets the contents of the target file.
|
java.lang.String |
interpreteFilePath(java.lang.String workspacePath,
IExecutionContext context)
Resolves references in the given workspace path (can be relative or
absolute).
|
void |
setContents(java.io.InputStream pInputStream,
FileDescriptor pFileDescriptor,
IExecutionContext pContext,
org.eclipse.core.runtime.IProgressMonitor pMon)
Creates a file with the given input stream.
|
void |
setContents(java.io.InputStream pInputStream,
FileDescriptor pFileDescriptor,
IExecutionContext pContext,
java.lang.String pLocalCP,
org.eclipse.core.runtime.IProgressMonitor pMon)
Sets the contents of the target file.
|
public IGetDataResponse getContents(FileDescriptor pFileDescr, IExecutionContext pContext) throws java.io.IOException
IFileDescriptorReadergetContents in interface IFileDescriptorReaderpFileDescr - the target file descriptorpContext - the execution contextjava.io.IOException - if reading the file failspublic void setContents(java.io.InputStream pInputStream,
FileDescriptor pFileDescriptor,
IExecutionContext pContext,
org.eclipse.core.runtime.IProgressMonitor pMon)
throws java.io.IOException
NamePhysical
attribute of the given File Descriptor will be the
workspace-relative path of the created file.setContents in interface IFileDescriptorReaderpInputStream - the new contentspFileDescriptor - the target file descriptorpContext - the contextpMon - progress monitorjava.io.IOException - if setting the file contents failspublic java.lang.String interpreteFilePath(java.lang.String workspacePath,
IExecutionContext context)
throws java.io.IOException
workspacePath - the workspace pathcontext - the contextjava.io.IOException - when the AWM application cache folder cannot be accessed.TaurusUtility.resolveReference(String, IExecutionContext)public void setContents(java.io.InputStream pInputStream,
FileDescriptor pFileDescriptor,
IExecutionContext pContext,
java.lang.String pLocalCP,
org.eclipse.core.runtime.IProgressMonitor pMon)
throws java.io.IOException
pInputStream - the new file contentspFileDescriptor - the target file descriptorpContext - the execution contextpLocalCP - the local code page used to create the input streampMon - progress monitorjava.io.IOException - if setting the file contents failspublic boolean fileExists(FileDescriptor pFileDescriptor, IExecutionContext pContext, org.eclipse.core.runtime.IProgressMonitor pMon) throws java.io.IOException
IFileDescriptorReaderfileExists in interface IFileDescriptorReaderpFileDescriptor - the file to checkpContext - the execution contextpMon - a progress monitortrue if the file exists, otherwise falsejava.io.IOException - if an error occurs while checking the file existenceCopyright © 2015 Micro Focus GmbH. All rights reserved.