mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[208778] [efs][api] Improve default impl of new getOutputStream() API for backward compatibility
This commit is contained in:
parent
47d69ab7aa
commit
2049848c1a
1 changed files with 14 additions and 2 deletions
|
@ -202,14 +202,26 @@ public abstract class AbstractFileService implements IFileService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default implementation returns <code>null</code>. Clients can override to return an output stream to the file.
|
* Gets the output stream to write/append to a remote file.
|
||||||
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(String, String, boolean, IProgressMonitor)
|
* The default implementation returns <code>null</code>.
|
||||||
|
* Clients can override to return an output stream to the file.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
|
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the output stream to write/append to a remote file.
|
||||||
|
* The default implementation returns <code>null</code>.
|
||||||
|
* Clients can override to return an output stream to the file.
|
||||||
|
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(String, String, boolean, int, IProgressMonitor)
|
||||||
|
*/
|
||||||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
|
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
|
||||||
|
if ((options & IFileService.APPEND) == 0) {
|
||||||
|
//forward to old deprecated implementation for backward compatibility with old services
|
||||||
|
return getOutputStream(remoteParent, remoteFile, isBinary, monitor);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue